Skip to content

Commit

Permalink
update pyyaml
Browse files Browse the repository at this point in the history
  • Loading branch information
senwu committed Mar 1, 2020
1 parent 18c1fe5 commit 1d3334f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")],
install_requires=[
"numpy>=1.11, <2.0",
"pyyaml>=4.2b1, <5.0",
"pyyaml>=5.1, <6.0",
"scikit-learn>=0.20.3, <0.21.0",
"scipy>=1.1.0, <2.0.0",
"tensorboard>=2.0.1, <3.0.0",
Expand Down
6 changes: 4 additions & 2 deletions src/emmental/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def init_config() -> None:
os.path.dirname(os.path.realpath(__file__)), "emmental-default-config.yaml"
)
with open(default_config_path, "r") as f:
config = yaml.load(f)
config = yaml.load(f, Loader=yaml.FullLoader)
logger.info(f"Loading Emmental default config from {default_config_path}.")

Meta.config = config
Expand Down Expand Up @@ -167,7 +167,9 @@ def update_config(
if os.path.exists(potential_path):
with open(potential_path, "r") as f:
Meta.config = merge(
Meta.config, yaml.load(f), specical_keys="checkpoint_metric"
Meta.config,
yaml.load(f, Loader=yaml.FullLoader),
specical_keys="checkpoint_metric",
)
logger.info(f"Updating Emmental config from {potential_path}.")
break
Expand Down

0 comments on commit 1d3334f

Please sign in to comment.