Skip to content

Commit

Permalink
from safe_load to load
Browse files Browse the repository at this point in the history
  • Loading branch information
MilagrosMarin committed Jan 1, 2024
1 parent 0885f48 commit 9b61920
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions element_deeplabcut/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import cv2
import csv
import yaml
import ruamel.yaml as yaml
import inspect
import importlib
import numpy as np
Expand Down Expand Up @@ -240,7 +240,7 @@ def extract_new_body_parts(cls, dlc_config: dict, verbose: bool = True):
), f"dlc_config is neither dict nor filepath\n Check: {dlc_config_fp}"
if dlc_config_fp.suffix in (".yml", ".yaml"):
with open(dlc_config_fp, "rb") as f:
dlc_config = yaml.safe_load(f)
dlc_config = yaml.load(f)
# -- Check and insert new BodyPart --
assert "bodyparts" in dlc_config, f"Found no bodyparts section in {dlc_config}"
tracked_body_parts = cls.fetch("body_part")
Expand Down Expand Up @@ -382,7 +382,7 @@ def insert_new_model(
)
if dlc_config_fp.suffix in (".yml", ".yaml"):
with open(dlc_config_fp, "rb") as f:
dlc_config = yaml.safe_load(f)
dlc_config = yaml.load(f)
if isinstance(params, dict):
dlc_config.update(params)

Expand Down

0 comments on commit 9b61920

Please sign in to comment.