Spaces:
Running
Running
Merge pull request #209 from biggraph/darabos-mcp-fixes
Browse files
lynxkite-app/web/src/index.css
CHANGED
@@ -325,6 +325,7 @@ body {
|
|
325 |
.table-viewer {
|
326 |
td {
|
327 |
padding: 5px 10px;
|
|
|
328 |
}
|
329 |
|
330 |
.image-in-table {
|
|
|
325 |
.table-viewer {
|
326 |
td {
|
327 |
padding: 5px 10px;
|
328 |
+
vertical-align: top;
|
329 |
}
|
330 |
|
331 |
.image-in-table {
|
lynxkite-core/src/lynxkite/core/ops.py
CHANGED
@@ -254,8 +254,8 @@ def op(
|
|
254 |
_view = "image"
|
255 |
func = matplotlib_to_image(func)
|
256 |
if slow:
|
257 |
-
func = mem.cache(func)
|
258 |
func = make_async(func)
|
|
|
259 |
# Positional arguments are inputs.
|
260 |
inputs = [
|
261 |
Input(name=name, type=param.annotation)
|
@@ -456,6 +456,7 @@ def parse_doc(func):
|
|
456 |
return doc
|
457 |
if doc is None:
|
458 |
return None
|
|
|
459 |
ds = griffe.Docstring(doc, parent=_get_griffe_function(func))
|
460 |
if "----" in doc:
|
461 |
ds = ds.parse("numpy")
|
|
|
254 |
_view = "image"
|
255 |
func = matplotlib_to_image(func)
|
256 |
if slow:
|
|
|
257 |
func = make_async(func)
|
258 |
+
func = mem.cache(func)
|
259 |
# Positional arguments are inputs.
|
260 |
inputs = [
|
261 |
Input(name=name, type=param.annotation)
|
|
|
456 |
return doc
|
457 |
if doc is None:
|
458 |
return None
|
459 |
+
griffe.logger.setLevel("ERROR")
|
460 |
ds = griffe.Docstring(doc, parent=_get_griffe_function(func))
|
461 |
if "----" in doc:
|
462 |
ds = ds.parse("numpy")
|
lynxkite-core/src/lynxkite/core/workspace.py
CHANGED
@@ -52,7 +52,7 @@ class WorkspaceNode(BaseConfig):
|
|
52 |
"""Notifies the frontend that work has started on this node."""
|
53 |
self.data.error = None
|
54 |
self.data.status = NodeStatus.active
|
55 |
-
if hasattr(self, "_crdt"):
|
56 |
with self._crdt.doc.transaction():
|
57 |
self._crdt["data"]["error"] = None
|
58 |
self._crdt["data"]["status"] = NodeStatus.active
|
@@ -63,7 +63,7 @@ class WorkspaceNode(BaseConfig):
|
|
63 |
self.data.input_metadata = result.input_metadata
|
64 |
self.data.error = result.error
|
65 |
self.data.status = NodeStatus.done
|
66 |
-
if hasattr(self, "_crdt"):
|
67 |
with self._crdt.doc.transaction():
|
68 |
try:
|
69 |
self._crdt["data"]["status"] = NodeStatus.done
|
|
|
52 |
"""Notifies the frontend that work has started on this node."""
|
53 |
self.data.error = None
|
54 |
self.data.status = NodeStatus.active
|
55 |
+
if hasattr(self, "_crdt") and "data" in self._crdt:
|
56 |
with self._crdt.doc.transaction():
|
57 |
self._crdt["data"]["error"] = None
|
58 |
self._crdt["data"]["status"] = NodeStatus.active
|
|
|
63 |
self.data.input_metadata = result.input_metadata
|
64 |
self.data.error = result.error
|
65 |
self.data.status = NodeStatus.done
|
66 |
+
if hasattr(self, "_crdt") and "data" in self._crdt:
|
67 |
with self._crdt.doc.transaction():
|
68 |
try:
|
69 |
self._crdt["data"]["status"] = NodeStatus.done
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/core.py
CHANGED
@@ -227,13 +227,13 @@ async def _execute_node(
|
|
227 |
if p.type == nx.Graph:
|
228 |
if isinstance(x, Bundle):
|
229 |
x = x.to_nx()
|
230 |
-
assert isinstance(x, nx.Graph), "Input must be a graph."
|
231 |
elif p.type == Bundle:
|
232 |
if isinstance(x, nx.Graph):
|
233 |
x = Bundle.from_nx(x)
|
234 |
elif isinstance(x, pd.DataFrame):
|
235 |
x = Bundle.from_df(x)
|
236 |
-
assert isinstance(x, Bundle), "Input must be a graph or dataframe."
|
237 |
inputs.append(x)
|
238 |
except Exception as e:
|
239 |
if not os.environ.get("LYNXKITE_SUPPRESS_OP_ERRORS"):
|
|
|
227 |
if p.type == nx.Graph:
|
228 |
if isinstance(x, Bundle):
|
229 |
x = x.to_nx()
|
230 |
+
assert isinstance(x, nx.Graph), f"Input must be a graph. Got: {x}"
|
231 |
elif p.type == Bundle:
|
232 |
if isinstance(x, nx.Graph):
|
233 |
x = Bundle.from_nx(x)
|
234 |
elif isinstance(x, pd.DataFrame):
|
235 |
x = Bundle.from_df(x)
|
236 |
+
assert isinstance(x, Bundle), f"Input must be a graph or dataframe. Got: {x}"
|
237 |
inputs.append(x)
|
238 |
except Exception as e:
|
239 |
if not os.environ.get("LYNXKITE_SUPPRESS_OP_ERRORS"):
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/networkx_ops.py
CHANGED
@@ -156,7 +156,7 @@ def wrapped(name: str, func):
|
|
156 |
for k, v in kwargs.items():
|
157 |
if v == "None":
|
158 |
kwargs[k] = None
|
159 |
-
res = await ops.
|
160 |
# Figure out what the returned value is.
|
161 |
if isinstance(res, nx.Graph):
|
162 |
return res
|
|
|
156 |
for k, v in kwargs.items():
|
157 |
if v == "None":
|
158 |
kwargs[k] = None
|
159 |
+
res = await ops.make_async(func)(*args, **kwargs)
|
160 |
# Figure out what the returned value is.
|
161 |
if isinstance(res, nx.Graph):
|
162 |
return res
|