Fix for run_cluster using snakemake.yaml with nwb_template#895
Merged
milesAraya merged 6 commits intodevelop-mainfrom Aug 7, 2025
Merged
Fix for run_cluster using snakemake.yaml with nwb_template#895milesAraya merged 6 commits intodevelop-mainfrom
milesAraya merged 6 commits intodevelop-mainfrom
Conversation
7 tasks
milesAraya
commented
Aug 4, 2025
itutu-tienday
approved these changes
Aug 5, 2025
Collaborator
There was a problem hiding this comment.
I have confirmed that it works, so I approve it.
- platform: Mac
- test cases
- snakemake_nwb_template.yaml.txt ... NG (
snakemake execution failed.)I'll approve it, but this case still shows an error (there's almost no error log).
If there seems to be a problem, please check it. - snakemake_no_template.yaml.txt ... OK
- snakemake_error_sample.yaml.txt ... OK
- snakemake_nwb_template.yaml.txt ... NG (
Also, a Milestone (release version) has not been specified for this PR. Please specify one.
itutu-tienday
approved these changes
Aug 7, 2025
This was referenced Aug 7, 2025
This was referenced Aug 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update to correctly read snakemake.yaml nwb_template format with run_cluster
Content
Recently snakemake.yaml were updated to use a nwb_template instead of repeating the same template many times in the yaml file. However, when combined with run_cluster this caused path issues.
Main Issue:
Circular Dependency in NWB Reference Resolution
the full NWB data inline
references by re-reading the config file
- Extracted workspace_id/unique_id from the provided path
- Reconstructed a new path using get_config_yaml_path()
- Called ConfigReader.read() which returned {} (empty dict) due to path issues
- Failed assertion: assert config, f"Invalid config yaml file..."
Fix:
File: studio/app/common/core/snakemake/smk_utils.py
Before: Circular file reading
config = SmkConfigReader.read_from_path(config_path) # Failed with {}
After: Direct config usage
rule_config = SmkUtils.resolve_nwbfile_reference(rule_config, snakemake.config)
Secondary Issue: Windows Path Handling
Fix:
File: studio/app/dir_path.py
locations
References
Link to nwb_template PR
Link to run_cluster PR
Testcase
Tutorial 1 RUN ALL
Check can be run with run_cluster
$OPTINIST_DIRand run run_clusterpython run_cluster.py --config="Downloads/snakemake_uniqueID.yaml"Mac
Windows
Docker
snakemake_nwb_template.yaml.txt
snakemake_no_template.yaml.txt
snakemake_error_sample.yaml.txt