Skip to content

Conversation

talsperre
Copy link
Collaborator

To test spin on a new flow you can do the following:

Simple case:

python <flow_name.py> --environment=conda spin <step_name>

Pass in specific pathspec:

python runtime_dag_flow.py --environment=conda spin --spin-pathspec RuntimeDAGFlow/13/step_c/275232971

Pass in custom artifacts via module:

python runtime_dag_flow.py spin --spin-pathspec RuntimeDAGFlow/13/step_d/275233082 --artifacts-module ./my_artifacts.py

Skip decorators (including the whitelisted ones):

python complex_dag_flow.py --environment=conda spin step_d --skip-decorators

Use with Runner API:

    with Runner('complex_dag_flow.py', environment="conda").spin(
        step_name,
        spin_pathspec="<Some Val>",
        artifacts_module='./artifacts/complex_dag_step_d.py',
    ) as spin:
        print("-" * 50)
        print(f"Running test for step: step_a")
        spin_task = spin.task
        print(f"my_output: {spin_task['my_output']}")
        assert spin_task['my_output'].data == [-1]

See the tests for more examples on hot to use this command.

----------
blob_iter : Iterator over bytes objects to save
raw : bool, optional
Whether to save the bytes directly or process them, by default False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add default False for raw instead of optional

# queries on that same TaskDatastore will be quick (since we already
# have all the metadata)
self._task_metadata_caches = OrderedDict()
# have all the metadata). We keep track of this in a file so it persists
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if same should be done for self._store_caches? which is right now an OrderedDict

# Get the parent steps
steps = []
for node_name, attributes in graph_info["steps"].items():
if step_name in attributes["next"]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if in_funcs can be used here somehow...

@talsperre talsperre force-pushed the dev/spin-rec-rebased branch from 4e80bfa to 94aa6d6 Compare August 25, 2025 07:40
@talsperre talsperre force-pushed the dev/spin-rec-rebased branch from 51bedca to 4e8163e Compare September 4, 2025 00:54
@talsperre talsperre force-pushed the dev/spin-rec-rebased branch from 4e8163e to e785d31 Compare September 4, 2025 01:01
@talsperre talsperre force-pushed the dev/spin-rec-rebased branch from e785d31 to 4d0ad94 Compare September 4, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants