Skip to content

Commit

Permalink
hydra fix
Browse files Browse the repository at this point in the history
Summary: Workaround for oddity with new hydra.

Reviewed By: davnov134

Differential Revision: D39280639

fbshipit-source-id: 76e91947f633589945446db93cf2dbc259642f8a
  • Loading branch information
bottler authored and facebook-github-bot committed Sep 7, 2022
1 parent df36223 commit 90b758f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/implicitron_trainer/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@

logger = logging.getLogger(__name__)

# workaround for https://github.com/facebookresearch/hydra/issues/2262
_RUN = hydra.types.RunMode.RUN

if version.parse(hydra.__version__) < version.Version("1.1"):
raise ValueError(
f"Hydra version {hydra.__version__} is too old."
Expand Down Expand Up @@ -136,6 +139,7 @@ class Experiment(Configurable): # pyre-ignore: 13
default_factory=lambda: {
"run": {"dir": "."}, # Make hydra not change the working dir.
"output_subdir": None, # disable storing the .hydra logs
"mode": _RUN,
}
)

Expand Down
1 change: 1 addition & 0 deletions projects/implicitron_trainer/tests/experiment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ hydra:
run:
dir: .
output_subdir: null
mode: RUN
data_source_ImplicitronDataSource_args:
dataset_map_provider_class_type: ???
data_loader_map_provider_class_type: SequenceDataLoaderMapProvider
Expand Down

0 comments on commit 90b758f

Please sign in to comment.