Skip to content

Commit 2cf9f5d

Browse files
author
Hovhannes Tamoyan
committed
[feat] Add modular configs for slurm and aim. Decouple hf datasets. Better namings
1 parent 407ee4d commit 2cf9f5d

18 files changed

+76
-70
lines changed

urartu/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.22
1+
2.0.23

urartu/commands/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22
from typing import Tuple
33

4-
from .command import Command
4+
from urartu.commands.command import Command
55

66
from .register import Register
77
from .unregister import Unregister

urartu/commands/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from overrides import overrides
55

6-
from ..utils.registrable import Registrable
6+
from urartu.utils.registrable import Registrable
77

88
T = TypeVar("T", bound="Command")
99

urartu/commands/launch.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from hydra import compose, initialize
77
from hydra.core.plugins import Plugins
88
from omegaconf import OmegaConf
9-
from .command import Command
10-
from ..utils.launcher import launch, launch_on_slurm
11-
from ..utils.slurm import is_submitit_available
12-
from ..utils.registry import Registry
13-
from ..utils.hydra_plugin import UrartuPlugin
9+
from urartu.commands.command import Command
10+
from urartu.utils.launcher import launch, launch_on_slurm
11+
from urartu.utils.slurm import is_submitit_available
12+
from urartu.utils.registry import Registry
13+
from urartu.utils.hydra_plugin import UrartuPlugin
1414

1515
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
1616

urartu/commands/register.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import re
44
from pathlib import Path
55

6-
from .command import Command
7-
from ..utils.registry import Registry
6+
from urartu.commands.command import Command
7+
from urartu.utils.registry import Registry
88

99

1010
@Command.register("register")

urartu/commands/unregister.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import logging
33
import re
44

5-
from .command import Command
6-
from ..utils.registry import Registry
5+
from urartu.commands.command import Command
6+
from urartu.utils.registry import Registry
77

88

99
@Command.register("unregister")

urartu/config/aim/default_aim.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
aim:
2+
repo: ???
3+
log_system_params: true

urartu/config/main.yaml

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,7 @@
11
defaults:
22
- _self_
3-
- action_config: defaults
3+
- action_config: default_action_config
4+
- slurm: default_slurm
5+
- aim: default_aim
46

57
action_name: ???
6-
7-
aim:
8-
repo: "aim://0.0.0.0:53800"
9-
log_system_params: true
10-
11-
slurm:
12-
# Whether or not to run the job on SLURM
13-
use_slurm: false
14-
# Name of the job on SLURM
15-
name: "example"
16-
# Comment of the job on SLURM
17-
comment: "example job"
18-
# Partition of SLURM on which to run the job. This is a required field if using SLURM.
19-
partition: ""
20-
account: ""
21-
# Where the logs produced by the SLURM jobs will be output
22-
log_folder: "./slurm_logs"
23-
# Maximum number of hours / minutes needed by the job to complete. Above this limit, the job might be pre-empted.
24-
time_hours: 1
25-
time_minutes: 0
26-
# Additional constraints on the hardware of the nodes to allocate (example 'volta' to select a volta GPU)
27-
constraint: ""
28-
# GB of RAM memory to allocate for each node
29-
mem_gb: 100
30-
# TCP port on which the workers will synchronize themselves with torch distributed
31-
port_id: 40050
32-
# Number of CPUs per GPUs to request on the cluster.
33-
num_cpu_per_proc: 4
34-
# Number of GPUs per node to request on the cluster.
35-
num_gpu_per_node: 4
36-
# Number of nodes to request on the cluster.
37-
num_nodes: 1
38-
# Number of processes per node to request on the cluster.
39-
num_proc_per_node: 1
40-
# Any other parameters for slurm (e.g. account, hint, distribution, etc.,) as dictated by submitit.
41-
# Please see https://github.com/facebookincubator/submitit/issues/23#issuecomment-695217824.
42-
additional_parameters: {}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
slurm:
2+
use_slurm: ???

0 commit comments

Comments
 (0)