Skip to content

Commit

Permalink
Change Task ID to directory path (#486)
Browse files Browse the repository at this point in the history
* Modifying task id to include directory
  • Loading branch information
lucpeterson authored Jun 12, 2024
1 parent 831bc40 commit e919ee8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Modified the unit tests for the `merlin status` command to use pytest rather than unittest
- Added fixtures for `merlin status` tests that copy the workspace to a temporary directory so you can see exactly what's run in a test
- Batch block and workers now allow for variables to be used in node settings
- Task id is now the path to the directory

### Fixed
- Bugfix for output of `merlin example openfoam_wf_singularity`
Expand Down
8 changes: 7 additions & 1 deletion merlin/common/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def add_merlin_expanded_chain_to_chord( # pylint: disable=R0913,R0914
top_lvl_workspace=top_lvl_workspace,
)
new_step.set(queue=step.get_task_queue())
new_step.set(task_id=os.path.join(workspace, relative_paths[sample_id]))
new_chain.append(new_step)

all_chains.append(new_chain)
Expand Down Expand Up @@ -382,7 +383,12 @@ def add_simple_chain_to_chord(self, task_type, chain_, adapter_config):
# based off of the parameter substitutions and relative_path for
# a given sample.

new_steps = [task_type.s(step, adapter_config=adapter_config).set(queue=step.get_task_queue())]
new_steps = [
task_type.s(step, adapter_config=adapter_config).set(
queue=step.get_task_queue(),
task_id=step.get_workspace(),
)
]
all_chains.append(new_steps)
chain_1d = get_1d_chain(all_chains)
launch_chain(self, chain_1d)
Expand Down

0 comments on commit e919ee8

Please sign in to comment.