Visitar URL original
Refactor `ctd_conditions` / `conditions_provider` + add `ConditionsConfig` + fix `InferenceConfig` by deruyter92 · Pull Request #3387 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
dfaeabb
refactor ctd config (inference)
deruyter92 Jul 9, 2026
d698c85
refactor data/ctd.py: replace get_loader_and_snapshot with helper.
deruyter92 Jul 10, 2026
c13f25f
refactor data/ctd.py: remove ABC CondProvider
deruyter92 Jul 10, 2026
986ac8d
refactor ConditionsConfig: add build from shuffle
deruyter92 Jul 10, 2026
73f0d77
refactor ConditionsConfig: clean up build constructors
deruyter92 Jul 10, 2026
77807e2
Add affords_bu_inference property to ConditionsConfig
deruyter92 Jul 10, 2026
67229b9
refactor callers with ctd_conditions: use normalized ConditionsConfig…
deruyter92 Jul 10, 2026
0660100
refactor data/ctd.py and apis/ctd.py
deruyter92 Jul 10, 2026
8553294
add ConditionsShuffleConfig and `resolve_from_conditions()`
deruyter92 Jul 10, 2026
3ebd7b0
refactor analyze_images: clean normalization of ctd_conditions
deruyter92 Jul 14, 2026
1ed7e61
refactor analyze_image_folder (only accept resolved cond_provider)
deruyter92 Jul 14, 2026
35cf90a
refactor analyze_videos and analyze_images (strict ConditionsShuffleC…
deruyter92 Jul 14, 2026
38cca93
add missing shuffle literal
deruyter92 Jul 14, 2026
b87c970
Fix load_conditions_for_evaluation: add support for Typed ConditionsC…
deruyter92 Jul 14, 2026
3592b16
Improve docstrings and function signatures
deruyter92 Jul 14, 2026
03036d9
add tests for ctd conditions configurations
deruyter92 Jul 14, 2026
047dfa4
remove unused property "affords_bu_inference"
deruyter92 Jul 14, 2026
c37fc07
refactor tests_ctd_conditions, improve variable names and fix circula…
deruyter92 Jul 14, 2026
9642add
update test_ctd_conditions
deruyter92 Jul 14, 2026
7a36f4a
Merge branch 'main' into jaap/fix_ctd_conditions_config
deruyter92 Jul 20, 2026
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
Prev Previous commit
Next Next commit
remove unused property "affords_bu_inference"
  • Loading branch information
deruyter92 committed Jul 14, 2026
commit 047dfa4f7d845095a23f67ef88cfaba00a98e2d1
11 changes: 0 additions & 11 deletions deeplabcut/pose_estimation_pytorch/config/ctd_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,6 @@ class ConditionsConfig(DLCBaseConfig):

source: Literal["file", "model", "shuffle"]

@property
def affords_bu_inference(self) -> bool:
"""Whether this config is already a resolved BU model for live inference.

Only ``ConditionsModelConfig`` returns ``True``. A ``ConditionsShuffleConfig``
can be turned into one via ``ConditionsModelConfig.resolve_from_conditions()``
but does not afford inference until resolved. ``ConditionsFileConfig`` never
affords live BU inference (evaluation-only).
"""
return isinstance(self, ConditionsModelConfig)

@classmethod
def build(
cls,
Expand Down
12 changes: 0 additions & 12 deletions tests/pose_estimation_pytorch/config/test_ctd_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,6 @@ def test_conditions_config_build_rejects_unsupported_type():
ConditionsConfig.build(42) # type: ignore[arg-type]


@pytest.mark.parametrize(
"conditions, expected",
[
(_model_cfg(), True),
(ConditionsShuffleConfig(shuffle=1), False),
(ConditionsFileConfig(filepath=Path("/x.h5")), False),
],
)
def test_affords_bu_inference(conditions, expected):
assert conditions.affords_bu_inference is expected


# --- resolve_from_conditions --------------------------------------------------


Expand Down
Loading