From 768fe3a0996e106bf5badd5300d61b11823383f0 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Fri, 16 Aug 2024 10:53:08 -0500 Subject: [PATCH 1/3] feat(model): add `labeled_video_file` attribute of type `filepath@dlc-processed` --- element_deeplabcut/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/element_deeplabcut/model.py b/element_deeplabcut/model.py index 61341e5..2c02843 100644 --- a/element_deeplabcut/model.py +++ b/element_deeplabcut/model.py @@ -887,6 +887,7 @@ class File(dj.Part): -> VideoRecording.File --- labeled_video_path: varchar(255) # relative path to labeled video + labeled_video_file=null: filepath@dlc-processed """ @property @@ -964,6 +965,7 @@ def make(self, key): "labeled_video_path": labeled_video_path.relative_to( get_dlc_processed_data_dir() ).as_posix(), + "labeled_video_file": labeled_video_path.as_posix(), } ) From f51c072400538793534bffdeb9e9f23803084468 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Fri, 16 Aug 2024 10:58:27 -0500 Subject: [PATCH 2/3] Update tutorial_pipeline.py --- tests/tutorial_pipeline.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tutorial_pipeline.py b/tests/tutorial_pipeline.py index dd502d3..0a1035e 100644 --- a/tests/tutorial_pipeline.py +++ b/tests/tutorial_pipeline.py @@ -95,7 +95,12 @@ class Device(dj.Lookup): # Activate DeepLabCut schema ----------------------------------- - +# Configure external storage ------------- +dj.config["stores"]["dlc-processed"] = dict( + protocol="file", + location=get_dlc_processed_data_dir(), + stage=get_dlc_processed_data_dir(), +) train.activate(db_prefix + "train", linking_module=__name__) model.activate(db_prefix + "model", linking_module=__name__) From a085b0c800a25598f9b84f7d9641a3bc4d1cdeb6 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Fri, 16 Aug 2024 10:59:18 -0500 Subject: [PATCH 3/3] Update tutorial_pipeline.py --- tests/tutorial_pipeline.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/tutorial_pipeline.py b/tests/tutorial_pipeline.py index 0a1035e..e3a8ae7 100644 --- a/tests/tutorial_pipeline.py +++ b/tests/tutorial_pipeline.py @@ -10,8 +10,12 @@ from element_lab.lab import Source, Lab, Protocol, User, Project -if "custom" not in dj.config: - dj.config["custom"] = {} +os.environ["DJ_SUPPORT_FILEPATH_MANAGEMENT"] = "TRUE" +dj.config["filepath_checksum_size_limit"] = 10 * 1024 * 1024 # 10 MB + +for key in ("custom", "stores"): + if key not in dj.config: + dj.config[key] = {} # overwrite dj.config['custom'] values with environment variables if available