From f69c46a7ff4d9ec62bdc57ce99315cfc241a8e59 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Mon, 9 Sep 2024 14:02:00 -0500 Subject: [PATCH] fix(pose_estimation): Save config to outbox as dj_dlc_config --- CHANGELOG.md | 3 +++ element_deeplabcut/model.py | 4 +--- element_deeplabcut/readers/dlc_reader.py | 2 +- element_deeplabcut/version.py | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c2a89b..651558f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. +## [0.3.2] - 2024-09-09 + ++ Fix - Save config file to output directory as `dj_dlc_config` ## [0.3.1] - 2024-08-16 diff --git a/element_deeplabcut/model.py b/element_deeplabcut/model.py index 61341e5..b1b1c51 100644 --- a/element_deeplabcut/model.py +++ b/element_deeplabcut/model.py @@ -784,9 +784,7 @@ def do_analyze_videos(): # ---- Write config files ---- config_filename = f"dj_dlc_config_{datetime.now(tz=timezone.utc).strftime('%Y%m%d_%H%M%S')}.yaml" # To output dir: Important for loading/parsing output in datajoint - _ = dlc_reader.save_yaml( - output_dir, dlc_config, filename=config_filename - ) + _ = dlc_reader.save_yaml(output_dir, dlc_config) # To project dir: Required by DLC to run the analyze_videos if dlc_project_path != output_dir: config_filepath = dlc_reader.save_yaml( diff --git a/element_deeplabcut/readers/dlc_reader.py b/element_deeplabcut/readers/dlc_reader.py index f682b6a..7eaff22 100644 --- a/element_deeplabcut/readers/dlc_reader.py +++ b/element_deeplabcut/readers/dlc_reader.py @@ -238,7 +238,7 @@ def save_yaml( if "config_template" in config_dict: # if passed full model.Model dict config_dict = config_dict["config_template"] if mkdir: - output_dir.mkdir(exist_ok=True) + Path(output_dir).mkdir(exist_ok=True) if "." in filename: # if user provided extension, remove filename = filename.split(".")[0] diff --git a/element_deeplabcut/version.py b/element_deeplabcut/version.py index 4974c87..931952f 100644 --- a/element_deeplabcut/version.py +++ b/element_deeplabcut/version.py @@ -2,4 +2,4 @@ Package metadata """ -__version__ = "0.3.1" +__version__ = "0.3.2"