diff --git a/examples/basic-job-example-config.yaml b/examples/basic-job-example-config.yaml index ca86c04..27dcb5d 100644 --- a/examples/basic-job-example-config.yaml +++ b/examples/basic-job-example-config.yaml @@ -22,7 +22,7 @@ hydra: training_cfg: # entry_script: Required. Path to the entry script of training/fine-tuning, this path should be inside container - entry_script: ./train.py + entry_script: /opt/pytorch-mnist/mnist.py # script_args: Optional. List of script arguments. Example of usage: # script_args: # - --max_context_width: 4096 @@ -90,7 +90,7 @@ cluster: # base_results_dir: Optional. Location to store the results, checkpoints and logs. base_results_dir: ./result # container: Required. Docker image to be used for Training Job -container: docker.io/kubeflowkatib/pytorch-mnist:v1beta1-45c5727 +container: docker.io/kubeflowkatib/pytorch-mnist-cpu:v1beta1-bc09cfd # env_vars: Optional. Environment variables passed to the training job. env_vars: diff --git a/src/hyperpod_cli/utils.py b/src/hyperpod_cli/utils.py index d969209..477d293 100644 --- a/src/hyperpod_cli/utils.py +++ b/src/hyperpod_cli/utils.py @@ -105,11 +105,11 @@ def store_current_hyperpod_context(data): def _retrieve_current_hyperpod_context(): - file = open( + with open( GENERATED_LAUNCHER_CONFIG_FILE_PATH + HYPERPOD_CLUSTER_CONTEXT_FILE_NAME, "r", - ) - return json.load(file) + ) as file: + return json.load(file) def _validate_link(console_url): diff --git a/test/integration_tests/data/basicJob.yaml b/test/integration_tests/data/basicJob.yaml index bfeef25..5b0b406 100644 --- a/test/integration_tests/data/basicJob.yaml +++ b/test/integration_tests/data/basicJob.yaml @@ -19,7 +19,7 @@ hydra: output_subdir: null training_cfg: - entry_script: ./train.py + entry_script: /opt/pytorch-mnist/mnist.py script_args: [] run: name: hyperpod-cli-test # Current run name @@ -49,7 +49,7 @@ cluster: restartPolicy: OnFailure # restart policy base_results_dir: ./result # Location to store the results, checkpoints and logs. -container: docker.io/kubeflowkatib/pytorch-mnist:v1beta1-45c5727 # container to use +container: docker.io/kubeflowkatib/pytorch-mnist-cpu:v1beta1-bc09cfd # container to use env_vars: NCCL_DEBUG: INFO # Logging level for NCCL. Set to "INFO" for debug information \ No newline at end of file