Skip to content

Commit

Permalink
Fix load from config (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed Apr 19, 2021
1 parent 499a5e5 commit e794649
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/accelerate/commands/config/config_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def load_config_from_file(config_file):
if config_file.endswith(".json"):
if (
json.load(f).get("compute_environment", ComputeEnvironment.LOCAL_MACHINE)
is ComputeEnvironment.LOCAL_MACHINE
== ComputeEnvironment.LOCAL_MACHINE
):
config_class = ClusterConfig
else:
Expand All @@ -53,7 +53,7 @@ def load_config_from_file(config_file):
else:
if (
yaml.safe_load(f).get("compute_environment", ComputeEnvironment.LOCAL_MACHINE)
is ComputeEnvironment.LOCAL_MACHINE
== ComputeEnvironment.LOCAL_MACHINE
):
config_class = ClusterConfig
else:
Expand Down

0 comments on commit e794649

Please sign in to comment.