Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to launch #272

Merged
merged 12 commits into from
May 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions tests/test_launch/test_implementations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2022 Massachusetts Institute of Technology
# SPDX-License-Identifier: MIT

import warnings
from pathlib import Path

import pytest
Expand Down Expand Up @@ -80,15 +79,7 @@ def task_fn(cfg):
assert len(dataclasses.fields(cfg)) > 0

if not to_dictconfig:
with pytest.warns(
warnings.warn(
"There may ben an issue with your dataclass. If you just executed with a "
+ "`hydra/launcher` that utilizes cloudpickle (e.g., hydra-submitit-launcher), there is a known "
+ "issue with dataclasses (see: https://github.com/cloudpipe/cloudpickle/issues/386). You will have "
+ "to restart your interactive environment ro run `launch` again. To avoid this issue you can use the option "
+ "`to_dictconfig=True`."
)
):
with pytest.warns(UserWarning):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, that's how you do that.

launch(cfg, task_function=task_fn, to_dictconfig=to_dictconfig)
else:
# run again with no error
Expand Down