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

yaml deprecation warning #35

Open
asebian opened this issue Dec 19, 2021 · 1 comment
Open

yaml deprecation warning #35

asebian opened this issue Dec 19, 2021 · 1 comment

Comments

@asebian
Copy link

asebian commented Dec 19, 2021

Hi,
working through the jupyter tutorial I came across this warning.

s = ro.system_from_yaml(...)
/usr/local/lib/python3.9/dist-packages/rayopt/formats.py:89: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  dat = yaml.load(text)

It was easy to suppress it, but there might be a better way.

import yaml
yaml.warnings({'YAMLLoadWarning': False})

Thanks for sharing!

@decmur
Copy link

decmur commented Mar 13, 2024

This now throws an error because yaml requires a loader to be set. I believe the safe_load can be used to do the deprecated load function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants