(default_model_storage: ModelStorage)
| 168 | |
| 169 | |
| 170 | def test_unused_node(default_model_storage: ModelStorage): |
| 171 | graph_schema = GraphSchema( |
| 172 | { |
| 173 | "provide": SchemaNode( |
| 174 | needs={}, |
| 175 | uses=ProvideX, |
| 176 | fn="provide", |
| 177 | constructor_name="create", |
| 178 | config={}, |
| 179 | is_target=True, |
| 180 | ), |
| 181 | # This node will not fail as it will be pruned because it is not a target |
| 182 | # or a target's ancestor. |
| 183 | "assert_false": SchemaNode( |
| 184 | needs={"i": "input"}, |
| 185 | uses=AssertComponent, |
| 186 | fn="run_assert", |
| 187 | constructor_name="create", |
| 188 | config={"value_to_assert": "some_value"}, |
| 189 | ), |
| 190 | } |
| 191 | ) |
| 192 | runner = DaskGraphRunner( |
| 193 | graph_schema=graph_schema, |
| 194 | model_storage=default_model_storage, |
| 195 | execution_context=ExecutionContext(graph_schema=graph_schema, model_id="1"), |
| 196 | ) |
| 197 | results = runner.run(inputs={"input": "some_other_value"}) |
| 198 | assert results == {"provide": 1} |
| 199 | |
| 200 | |
| 201 | def test_non_eager_can_use_inputs_for_constructor(default_model_storage: ModelStorage): |
nothing calls this directly
no test coverage detected
searching dependent graphs…