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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] MissingConfigException cannot be correctly deserialized, due to lack of missing_cfg_file ctor default #2535

Closed
2 tasks done
gazonk opened this issue Jan 5, 2023 · 1 comment 路 Fixed by #2543
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@gazonk
Copy link

gazonk commented Jan 5, 2023

馃悰 Bug

Description

in https://github.com/facebookresearch/hydra/blob/main/hydra/errors.py
the missing_cfg_file parameter of the MissingConfigException should be defaulted to None since it is optional, otherwise deserialization will fail.

Checklist

  • I checked on latest commit [7bc2b1a] of errors.py (7bc2b1a)
  • I created a minimal repro (See this for tips).

To reproduce

** Minimal Code/Config snippet to reproduce **

import pickle
import hydra
e = hydra.errors.MissingConfigException("missing", "file")
x = pickle.dumps(e)
y = pickle.loads(x)

** Stack trace/error message **

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() missing 1 required positional argument: 'missing_cfg_file'

Expected Behavior

successful deserialization:

>>> y
MissingConfigException('missing')

System information

  • Hydra Version : hydra-core==1.3.1
  • Python version : Python 3.8.13
  • Virtual environment type and version : None
  • Operating system : Ubuntu 22.04.1 LT

Additional context

This exception was serialized/deserialized when using ray tune.

@gazonk gazonk added the bug Something isn't working label Jan 5, 2023
@Jasha10
Copy link
Collaborator

Jasha10 commented Jan 12, 2023

Thanks for the bug report, @gazonk! I can reproduce the issue on my local machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants