Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions hyperpyyaml/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ def load_hyperpyyaml(
ruamel.yaml.constructor.BaseConstructor.construct_object.__defaults__ = (
True,
) # deep=True
# ruamel.yaml >= 0.19 added max_depth checking in the composer,
# but the legacy Loader class does not define this attribute.
if not hasattr(loader, 'max_depth'):
loader.max_depth = 0
hparams = yaml.load(yaml_stream, Loader=loader)
# Change back to normal default:
yaml.constructor.BaseConstructor.construct_object.__defaults__ = (
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"License :: OSI Approved :: Apache Software License",
],
packages=["hyperpyyaml"],
install_requires=["pyyaml>=5.1", "ruamel.yaml>=0.17.28,<0.19.0"],
install_requires=["pyyaml>=5.1", "ruamel.yaml>=0.17.28"],
)