From 230a0793220f29bea8cb4a7a34a16687ec90e4ba Mon Sep 17 00:00:00 2001 From: tooyosi Date: Tue, 17 Dec 2024 17:50:49 +0000 Subject: [PATCH] set auto_user ElevationLevel to admin and hugging face env variables to main task --- bajor/batch/train_finetuning.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bajor/batch/train_finetuning.py b/bajor/batch/train_finetuning.py index c00e02e..faa548a 100644 --- a/bajor/batch/train_finetuning.py +++ b/bajor/batch/train_finetuning.py @@ -249,6 +249,16 @@ def create_job_tasks(job_id, task_id=1, run_opts=''): working_directory='taskWorkingDirectory', container_run_options='--ipc=host' ), + user_identity = batchmodels.UserIdentity( + auto_user=batchmodels.AutoUserSpecification( + scope=batchmodels.AutoUserScope.task, + elevation_level=batchmodels.ElevationLevel.admin + ) + ), + environment_settings=[ + batchmodels.EnvironmentSetting(name="XDG_CACHE_HOME", value="$AZ_BATCH_NODE_SHARED_DIR/huggingface"), + batchmodels.EnvironmentSetting(name="HF_HOME", value="$AZ_BATCH_NODE_SHARED_DIR/huggingface"), + ], output_files=std_err_and_out ) tasks.append(task)