Skip to content

Commit

Permalink
Add fast_dev_run=False in default trainer config (#74)
Browse files Browse the repository at this point in the history
* Add `fast_dev_run=False` in default trainer config

Signed-off-by: Fabrice Normandin <normandf@mila.quebec>

* Add xfail for flaky integration test

Signed-off-by: Fabrice Normandin <normandf@mila.quebec>

* Adjust the fast_dev_run in `test_run_remote_job`

Signed-off-by: Fabrice Normandin <normandf@mila.quebec>

---------

Signed-off-by: Fabrice Normandin <normandf@mila.quebec>
  • Loading branch information
lebrice authored Oct 25, 2024
1 parent 0031536 commit 598627b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions project/algorithms/jax_rl_example_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ def lightning_trainer(max_epochs: int, tmp_path: Path):


# reducing the max_epochs from 75 down to 10 because it's just wayyy too slow.
@pytest.mark.xfail(reason="Seems to not be completely reproducible")
@pytest.mark.slow
# @pytest.mark.timeout(80)
@pytest.mark.parametrize("max_epochs", [15], indirect=True)
Expand Down
2 changes: 2 additions & 0 deletions project/configs/trainer/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ devices: 1

deterministic: true

fast_dev_run: false

min_epochs: 1
max_epochs: 10

Expand Down
2 changes: 1 addition & 1 deletion project/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_example_experiment_defaults(experiment_config: Config) -> None:
)


@use_overrides(["algorithm=example datamodule=cifar10 seed=1 +trainer.fast_dev_run=True"])
@use_overrides(["algorithm=example datamodule=cifar10 seed=1 trainer.fast_dev_run=True"])
def test_fast_dev_run(experiment_dictconfig: DictConfig):
result = main(experiment_dictconfig)
assert isinstance(result, dict)
Expand Down
2 changes: 1 addition & 1 deletion project/utils/remote_launcher_plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_can_load_configs(command_line_arguments: list[str]):
# otherwise it will use the local launcher!
"resources=gpu",
"cluster=mila",
"+trainer.fast_dev_run=True",
"trainer.fast_dev_run=True",
]
],
)
Expand Down

0 comments on commit 598627b

Please sign in to comment.