Skip to content

Commit 36e4b5d

Browse files
committed
Move REQUIRED_ARGS from _client_vars to environment.yaml
1 parent 631c0e4 commit 36e4b5d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

vec_inf/client/_client_vars.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,3 @@
7171

7272
# Required matching arguments for batch mode
7373
BATCH_MODE_REQUIRED_MATCHING_ARGS = ["venv", "log_dir"]
74-
75-
# Required arguments for launching jobs that don't have a default value and their
76-
# corresponding environment variables
77-
REQUIRED_ARGS = {
78-
"account": "VEC_INF_ACCOUNT",
79-
"work_dir": "VEC_INF_WORK_DIR",
80-
}

vec_inf/client/_slurm_vars.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,9 @@ def create_literal_type(values: list[str], fallback: str = "") -> Any:
7878
_config["allowed_values"]["resource_type"]
7979
)
8080

81+
# Extract required arguments, for launching jobs that don't have a default value and their
82+
# corresponding environment variables
83+
REQUIRED_ARGS: dict[str, str] = _config["required_args"]
84+
8185
# Extract default arguments
8286
DEFAULT_ARGS: dict[str, str] = _config["default_args"]

vec_inf/client/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
import requests
1515
import yaml
1616

17-
from vec_inf.client._client_vars import MODEL_READY_SIGNATURE, REQUIRED_ARGS
17+
from vec_inf.client._client_vars import MODEL_READY_SIGNATURE
1818
from vec_inf.client._exceptions import MissingRequiredFieldsError
19-
from vec_inf.client._slurm_vars import CACHED_CONFIG_DIR
19+
from vec_inf.client._slurm_vars import CACHED_CONFIG_DIR, REQUIRED_ARGS
2020
from vec_inf.client.config import ModelConfig
2121
from vec_inf.client.models import ModelStatus
2222

vec_inf/config/environment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ allowed_values:
1515
partition: []
1616
resource_type: ["l40s", "h100"]
1717

18+
required_args:
19+
account: "VEC_INF_ACCOUNT"
20+
work_dir: "VEC_INF_WORK_DIR"
21+
1822
default_args:
1923
cpus_per_task: "16"
2024
mem_per_node: "64G"

0 commit comments

Comments
 (0)