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

DeprecationWarning: SelectableGroups dict interface is deprecated. Use select. #13989

Closed
adamjstewart opened this issue Aug 2, 2022 · 4 comments · Fixed by #14052
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@adamjstewart
Copy link
Contributor

🐛 Bug

It seems like parts of PL are using deprecated parts of PL. I'm seeing the following DeprecationWarning in CI:

/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pytorch_lightning/utilities/argparse.py:345: in insert_env_defaults
    return fn(self, **kwargs)
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py:488: in __init__
    self._callback_connector.on_trainer_init(
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pytorch_lightning/trainer/connectors/callback_connector.py:89: in on_trainer_init
    self.trainer.callbacks.extend(_configure_external_callbacks())
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pytorch_lightning/trainer/connectors/callback_connector.py:262: in _configure_external_callbacks
    factories = entry_points().get("pytorch_lightning.callbacks_factory", ())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = {'array_api': [EntryPoint(name='numpy', value='numpy.array_api', group='array_api')], 'console_scripts': [EntryPoint(n...ame='projector', value='tensorboard.plugins.projector.projector_plugin:ProjectorPlugin', group='tensorboard_plugins')]}
name = 'pytorch_lightning.callbacks_factory', default = ()

    def get(self, name, default=None):
>       self._warn()
E       DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.

/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/importlib/metadata/__init__.py:430: DeprecationWarning

To Reproduce

Should be able to reproduce by testing any Trainer with pytest. I'm not even using callbacks:

Trainer(fast_dev_run=True, log_every_n_steps=1, max_epochs=1)          

Expected behavior

I would not expect to see a DeprecationWarning.

Environment

  • Lightning Component: Trainer
  • PyTorch Lightning Version: 1.7.0
  • Lightning App Version: N/A
  • PyTorch Version: 1.12.0
  • Python version: 3.10
  • OS: Linux
  • CUDA/cuDNN version: N/A
  • GPU models and configuration: N/A
  • How you installed PyTorch: pip
  • If compiling from source, the output of torch.__config__.show(): N/A
  • Running environment of LightningApp: CI
@adamjstewart adamjstewart added the needs triage Waiting to be triaged by maintainers label Aug 2, 2022
@carmocca carmocca added this to the pl:1.7.x milestone Aug 5, 2022
@carmocca carmocca added the bug Something isn't working label Aug 5, 2022
@carmocca carmocca self-assigned this Aug 5, 2022
@carmocca carmocca removed the needs triage Waiting to be triaged by maintainers label Aug 5, 2022
@carmocca
Copy link
Contributor

carmocca commented Aug 5, 2022

Thanks for the report! We missed this because we are not testing with Python 3.10 yet cc @akihironitta

@carmocca
Copy link
Contributor

carmocca commented Aug 5, 2022

Since we don't have CI setup for it yet, do you mind running your reproduction script on the #14052 branch?

@adamjstewart
Copy link
Contributor Author

Will test tonight. Is there anything holding up adding Python 3.10 to CI?

@akihironitta
Copy link
Contributor

@carmocca @adamjstewart Let me prioritise enabling it in CI this weekend. Here's the tracking issue #9980.

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.

3 participants