From e919ee8c6c95d0e91b8a2247764511ec4575a62b Mon Sep 17 00:00:00 2001 From: Luc Peterson Date: Wed, 12 Jun 2024 12:59:32 -0700 Subject: [PATCH] Change Task ID to directory path (#486) * Modifying task id to include directory --- CHANGELOG.md | 1 + merlin/common/tasks.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27933351..21b4427b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/merlin/common/tasks.py b/merlin/common/tasks.py index ab919a4a..143d3bf1 100644 --- a/merlin/common/tasks.py +++ b/merlin/common/tasks.py @@ -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) @@ -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)