Skip to content

Commit 90b758f

Browse files
bottlerfacebook-github-bot
authored andcommitted
hydra fix
Summary: Workaround for oddity with new hydra. Reviewed By: davnov134 Differential Revision: D39280639 fbshipit-source-id: 76e91947f633589945446db93cf2dbc259642f8a
1 parent df36223 commit 90b758f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

projects/implicitron_trainer/experiment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383

8484
logger = logging.getLogger(__name__)
8585

86+
# workaround for https://github.com/facebookresearch/hydra/issues/2262
87+
_RUN = hydra.types.RunMode.RUN
88+
8689
if version.parse(hydra.__version__) < version.Version("1.1"):
8790
raise ValueError(
8891
f"Hydra version {hydra.__version__} is too old."
@@ -136,6 +139,7 @@ class Experiment(Configurable): # pyre-ignore: 13
136139
default_factory=lambda: {
137140
"run": {"dir": "."}, # Make hydra not change the working dir.
138141
"output_subdir": None, # disable storing the .hydra logs
142+
"mode": _RUN,
139143
}
140144
)
141145

projects/implicitron_trainer/tests/experiment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ hydra:
99
run:
1010
dir: .
1111
output_subdir: null
12+
mode: RUN
1213
data_source_ImplicitronDataSource_args:
1314
dataset_map_provider_class_type: ???
1415
data_loader_map_provider_class_type: SequenceDataLoaderMapProvider

0 commit comments

Comments
 (0)