-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Add support for Python3.11 #5359
base: main
Are you sure you want to change the base?
Conversation
Fix a dependency conflicts.
|
Switching the operator from
|
Sorry for I didn't go through a lot of tests. I am pretty new to this lib. This seems an error for omegaconf(any version) which is not compatible for Python 3.11's dataclasses. I fix this by change code in Just like below: from dataclasses import _MISSING_TYPE
...
...
@staticmethod
def _create_impl( # noqa F811
obj: Any = _EMPTY_MARKER_, parent: Optional[BaseContainer] = None
) -> Union[DictConfig, ListConfig]:
try:
...
...
if isinstance(obj, type):
raise ValidationError(
f"Input class '{obj.__name__}' is not a structured config. "
"did you forget to decorate it as a dataclass?"
)
# Add a judgement for missing type
elif isinstance(obj, _MISSING_TYPE):
return DictConfig(content={}, parent=parent)
else:
raise ValidationError(
f"Object of unsupported type: '{type(obj).__name__}'"
) It looks like I need to improve compatibility with other libraries first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fairseq/models/transformer/transformer_config.py:120 should be field(default_factory=DecoderConfig)
fix the default factory for 'decoder' in DecoderConfig
excuse me, did this work, at least when in sync with the updates on the base branch? |
this is background for the omegaconf and hydra-cor pinned requirements: |
do this face 'NameError: name "EMPTY_MARKER" is not defined', why? |
Before submitting
What does this PR do?
Fixes #5012 (issue).
This PR updates supports for Python 3.11 and also add the adaptation of hydra by updating the version of hydra to 1.3.2.
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Sure!