Node settings arrive as keyword arguments, not a params dict
A python node's settings are constants of its own function, so they are passed the way its ports are: by name. The controller binds them to the compiled function, the `params` field is gone from the worker and remote protocols, and a setting sharing a port's name is reported as a node error rather than shadowing it. The panel's scaffold follows suit and keeps the header in step with both ports and settings. The demo's `pace` moves from a flow input to a setting of the training node, which is what it always was. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NUb8YpL2s3gmN9WTACTt4q
This commit is contained in:
@@ -64,7 +64,7 @@ def test_a_call_crosses_to_the_thread_and_the_answer_comes_back(loop):
|
||||
thread = call_in_thread(
|
||||
lambda: result.update(
|
||||
value=hub.run(
|
||||
"gpu", "flow", "node", "src", {"x": 1}, {}, "flow.node", timeout=5
|
||||
"gpu", "flow", "node", "src", {"x": 1}, "flow.node", timeout=5
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -93,7 +93,6 @@ def test_reports_arrive_before_the_answer_and_a_heartbeat_is_not_one(loop):
|
||||
"node",
|
||||
"src",
|
||||
{},
|
||||
{},
|
||||
"flow.node",
|
||||
timeout=5,
|
||||
run_id="r1",
|
||||
@@ -125,7 +124,7 @@ def test_a_failure_keeps_its_class_across_the_socket(loop):
|
||||
|
||||
def call() -> None:
|
||||
try:
|
||||
hub.run("gpu", "flow", "node", "src", {}, {}, "flow.node", timeout=5)
|
||||
hub.run("gpu", "flow", "node", "src", {}, "flow.node", timeout=5)
|
||||
except Exception as exc:
|
||||
caught.append(exc)
|
||||
|
||||
@@ -150,7 +149,7 @@ def test_a_worker_that_goes_away_fails_the_call_rather_than_hanging(loop):
|
||||
|
||||
def call() -> None:
|
||||
try:
|
||||
hub.run("gpu", "flow", "node", "src", {}, {}, "flow.node", timeout=30)
|
||||
hub.run("gpu", "flow", "node", "src", {}, "flow.node", timeout=30)
|
||||
except Exception as exc:
|
||||
caught.append(exc)
|
||||
|
||||
@@ -173,7 +172,7 @@ def test_silence_past_the_deadline_is_a_timeout(loop):
|
||||
|
||||
def call() -> None:
|
||||
try:
|
||||
hub.run("gpu", "flow", "node", "src", {}, {}, "flow.node", timeout=0.3)
|
||||
hub.run("gpu", "flow", "node", "src", {}, "flow.node", timeout=0.3)
|
||||
except Exception as exc:
|
||||
caught.append(exc)
|
||||
|
||||
@@ -186,7 +185,7 @@ def test_a_label_nothing_carries_is_named_rather_than_waited_on(loop):
|
||||
attach(hub, loop)
|
||||
|
||||
with pytest.raises(NoWorker, match="tpu"):
|
||||
hub.run("tpu", "flow", "node", "src", {}, {}, "flow.node", timeout=5)
|
||||
hub.run("tpu", "flow", "node", "src", {}, "flow.node", timeout=5)
|
||||
# Compiling against a machine that is not attached is not a broken node —
|
||||
# a node importing torch is correct there and missing here.
|
||||
assert hub.compile("tpu", "flow", "node", "src") is None
|
||||
@@ -208,9 +207,7 @@ def test_cancelling_a_run_reaches_only_that_run(loop):
|
||||
|
||||
def call(run_id: str) -> None:
|
||||
try:
|
||||
hub.run(
|
||||
"gpu", "flow", "node", "src", {}, {}, "flow.node", 30, run_id=run_id
|
||||
)
|
||||
hub.run("gpu", "flow", "node", "src", {}, "flow.node", 30, run_id=run_id)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user