Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rayg1234 committed Jan 21, 2025
1 parent 40e152c commit d707533
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/fairchem/core/_cli_hydra.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

from submitit import AutoExecutor
from submitit.helpers import Checkpointable, DelayedSubmission
from torch.distributed.launcher.api import LaunchConfig, elastic_launch

from fairchem.core.common import distutils
from fairchem.core.common.utils import get_timestamp_uid, setup_env_vars, setup_imports
Expand Down Expand Up @@ -184,6 +183,8 @@ def main(
f"Submitted job id: {job_cfg.timestamp_id}, slurm id: {job.job_id}, logs: {job_cfg.log_dir}"
)
else:
from torch.distributed.launcher.api import LaunchConfig, elastic_launch

if scheduler_cfg.ranks_per_node > 1:
logging.info(f"Running in local mode with {job_cfg.ranks_per_node} ranks")
launch_config = LaunchConfig(
Expand Down
7 changes: 6 additions & 1 deletion tests/core/test_hydra_cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
job:
device_type: CPU
scheduler:
mode: LOCAL

runner:
_target_: fairchem.core.components.runner.MockRunner
x: 10
y: 23
y: 23

0 comments on commit d707533

Please sign in to comment.