A node's worker label is worker, so a device is only a paired one
- NodeDef `device`/`device_policy` become `worker`/`worker_policy`, the issue `ignored_device` becomes `ignored_worker`, and the SDK's `@node` takes `worker=` and `worker_policy=` - FlowStore._migrate renames the keys in published and draft documents once, bumping their version; a queued run's `needs` reads the old key - placement passes the label as `label`, client regenerated - docs: worker placement wording, MCP issuer without DOMAIN, device rows in the CLI data directory and the API table, device links in compose comments
This commit is contained in:
@@ -17,8 +17,8 @@ def prepare(limit=8):
|
||||
@node(
|
||||
requires=["dataset", Port("lr", "float")],
|
||||
provides=[Port("loss", "float", stream=True), Port("weights", "artifact")],
|
||||
device="gpu",
|
||||
device_policy="prefer",
|
||||
worker="gpu",
|
||||
worker_policy="prefer",
|
||||
)
|
||||
def fit(dataset, lr, epochs=3):
|
||||
for step in range(epochs):
|
||||
@@ -68,12 +68,12 @@ def test_defaults_become_settings_and_ports_do_not():
|
||||
assert {p.port for p in nodes["fit"].requires} == {"dataset", "lr"}
|
||||
|
||||
|
||||
def test_device_travels_to_the_node():
|
||||
def test_worker_travels_to_the_node():
|
||||
definition = FlowDef.model_validate(a_flow().document())
|
||||
node_def = next(n for n in definition.nodes if n.id == "fit")
|
||||
|
||||
assert node_def.device == "gpu"
|
||||
assert node_def.device_policy == "prefer"
|
||||
assert node_def.worker == "gpu"
|
||||
assert node_def.worker_policy == "prefer"
|
||||
|
||||
|
||||
def test_a_required_port_takes_the_type_it_is_provided_as():
|
||||
|
||||
Reference in New Issue
Block a user