Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected when to apply __new_config_path__ in JID #359

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions dags/plugins/jid.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,12 @@ def __new_config_path__(config_path, exp_name, branch_id):
return os.path.join(new_config_dir, new_config_name)


if self.branch_id is not None:
# Overwrite the config file path (add subdir and change file name)
config_path = context.get('dag_run').conf.get('parameters', {}).get('config_file')
exp_name = context.get('dag_run').conf.get('experiment')
new_config_path = __new_config_path__(config_path, exp_name, self.branch_id)
# Update the config_path directly
context.get('dag_run').conf['parameters']['config_file'] = new_config_path
# Overwrite the config file path
config_path = context.get('dag_run').conf.get('parameters', {}).get('config_file')
exp_name = context.get('dag_run').conf.get('experiment')
new_config_path = __new_config_path__(config_path, exp_name, self.branch_id)
# Update the config_path directly
context.get('dag_run').conf['parameters']['config_file'] = new_config_path

return {
"_id" : str(uuid.uuid4()),
Expand Down