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.

# 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

@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 3 times, most recently from e785d31 to 4d0ad94 Compare September 4, 2025 01:02
Copy link
Contributor

@romain-intel romain-intel left a comment

Choose a reason for hiding this comment

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

Some smallish comment with maybe a small concern around the transfer of artifacts.

@talsperre talsperre force-pushed the dev/spin-rec-rebased branch 3 times, most recently from 241af68 to 3a36e8b Compare October 21, 2025 20:04
@talsperre talsperre merged commit ee68f27 into master Oct 22, 2025
33 checks passed
@talsperre talsperre deleted the dev/spin-rec-rebased branch October 22, 2025 16:11
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.

3 participants