"...resnet50_tensorflow.git" did not exist on "37c473238646961a4229e931a2ae51ecc721dced"
Commit 15c01f4d authored by Baber's avatar Baber
Browse files

refactor: preserve original task name during config inclusion

parent acc634fa
...@@ -243,7 +243,7 @@ class TaskManager: ...@@ -243,7 +243,7 @@ class TaskManager:
} }
# Only populate tags for configs that support it (not groups) # Only populate tags for configs that support it (not groups)
if config and task_type != "group" and populate_tags_fn: if config and task_type != "group" and populate_tags_fn:
populate_tags_fn(config, task_name, tasks_and_groups, True) populate_tags_fn(config, task_name, tasks_and_groups)
def _merge_task_configs( def _merge_task_configs(
self, base_config: dict, task_specific_config: dict, task_name: str self, base_config: dict, task_specific_config: dict, task_name: str
...@@ -289,6 +289,9 @@ class TaskManager: ...@@ -289,6 +289,9 @@ class TaskManager:
) -> Mapping: ) -> Mapping:
def _load_task(config, task): def _load_task(config, task):
if "include" in config: if "include" in config:
# Store the task name to preserve it after include processing
original_task_name = config.get("task", task)
config = { config = {
**utils.load_yaml_config( **utils.load_yaml_config(
yaml_path=None, yaml_path=None,
...@@ -296,7 +299,12 @@ class TaskManager: ...@@ -296,7 +299,12 @@ class TaskManager:
mode="full", mode="full",
), ),
**config, **config,
"task": original_task_name,
} }
# Ensure the task name from the group config is preserved
# This prevents tasks with the same include from being treated as duplicates
if self._config_is_python_task(config): if self._config_is_python_task(config):
if self._class_has_config_in_constructor(config["class"]): if self._class_has_config_in_constructor(config["class"]):
task_object = config["class"](config=config) task_object = config["class"](config=config)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment