You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to curry a solid with some default configuration, and then create an alias of that solid. This is a form of the "solid_factory" pattern. The resulting solid is a CallableNode, which cannot be run with execute_solid for some reason.
I expected to be able to use this aliasing pattern to build up a pipeline.
Traceback (most recent call last):
File "[...snip...]/test.py", line 28, in <module>
result = execute_solid(say_hello, input_values={
File "/opt/miniconda3/envs/dp-dagster/lib/python3.8/site-packages/dagster/utils/test/__init__.py", line 291, in execute_solid
check.inst_param(solid_def, "solid_def", NodeDefinition)
File "/opt/miniconda3/envs/dp-dagster/lib/python3.8/site-packages/dagster/check/__init__.py", line 178, in inst_param
raise_with_traceback(
File "/opt/miniconda3/envs/dp-dagster/lib/python3.8/site-packages/future/utils/__init__.py", line 446, in raise_with_tracebackraise exc.with_traceback(traceback)
dagster.check.ParameterCheckError: Param "solid_def" is not a NodeDefinition. Got <dagster.core.definitions.composition.CallableNode object at 0x7fd21ca33c10> which is type <class 'dagster.core.definitions.composition.CallableNode'>.
Workaround
Workaround from @alangenfeld. The idea is to use the configured property on the solid.
Using my_solid.alias() creates a PendingNodeInvocation, which we do not support using with execute_solid, unfortunately. However, we are moving towards direct invocation as the recommended testing API for solids, and that does work with PendingNodeInvocation. You can learn more about direct invocation here.
Here is what your code example would look like using direct invocation.
Summary
I am trying to curry a solid with some default configuration, and then create an alias of that solid. This is a form of the "solid_factory" pattern. The resulting solid is a
CallableNode
, which cannot be run with execute_solid for some reason.I expected to be able to use this aliasing pattern to build up a pipeline.
Reproduction
This yields the traceback:
Workaround
Workaround from @alangenfeld. The idea is to use the configured property on the solid.
Dagit UI/UX Issue Screenshots
Additional Info about Your Environment
Message from the maintainers:
Impacted by this bug? Give it a 👍. We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered: