Visitar URL original
Prepare TensorFlow deprecation - add `deeplabcut.api` by deruyter92 · Pull Request #3382 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
e428b43
unsilence DLCDeprecationWarning: show once per instance
deruyter92 Jun 25, 2026
6b9c0a5
add modules deeplabcut.api and deeplabcu.tensorflow_compat (init only)
deruyter92 Jun 25, 2026
ff39ba6
add tensorflow routing for deprecated tensorflow API
deruyter92 Jun 25, 2026
f59e84b
copy compat into tensorflow_compat/tensorflow_api
deruyter92 Jun 25, 2026
7c09133
update _tf_routing: resolve deprecated arguments
deruyter92 Jun 25, 2026
df64f9d
update _tf_routing.py: improve engine resolution
deruyter92 Jun 25, 2026
3320feb
copy compat into api/pose_estimation
deruyter92 Jun 25, 2026
2e1d49b
remove docstings in pose_estimation.py
deruyter92 Jun 25, 2026
2a1b2c2
temp clean pose_estimation_api
deruyter92 Jun 25, 2026
6e5b23c
update _tf_routing: require dropped, renamed params, and normalize gp…
deruyter92 Jun 25, 2026
d48f702
add canoncical pose estimation API with TF fallback
deruyter92 Jun 25, 2026
4ae1300
update tensorflow API in tensorflow_compat
deruyter92 Jun 25, 2026
0390a06
fix Engine imports across repo (core, not compat)
deruyter92 Jun 26, 2026
92477b3
hook up deeplabcut.api.pose_estimation instead of compat (main init +…
deruyter92 Jun 26, 2026
108f273
add tests for _tf_routing
deruyter92 Jun 26, 2026
198ddf2
generate_training_dataset: update Engine import (until not needed)
deruyter92 Jun 26, 2026
a55d35d
remove TensorFlow branches in generate_training_dataset
deruyter92 Jun 26, 2026
ffcf585
copy TensorFlow-only branches of generate_training_dataset to tensor…
deruyter92 Jun 26, 2026
ee220d2
remove engine parameter in generate_training_dataset (and in the tens…
deruyter92 Jun 26, 2026
ef218ba
adjust tf_routing: import top-level tensorflow_compat
deruyter92 Jun 26, 2026
2d2fbd2
fix rename_parameter order in evaluate_network API
deruyter92 Jun 26, 2026
c352cb7
hook up data_management / generate_training_dataset API
deruyter92 Jun 26, 2026
7059491
deeplabcut.api.pose_estimation fix incorrect dropped parameter destfo…
deruyter92 Jun 26, 2026
ed107aa
move get_available_aug_methods to engine
deruyter92 Jun 26, 2026
b52e33a
add smoke tests for split pose_estimation API
deruyter92 Jun 26, 2026
aafcf5d
add tests for return_network_path and visualization
deruyter92 Jun 26, 2026
1bcfc54
Revert generate_training_dataset migration (simplify PR)
deruyter92 Jun 26, 2026
05b4865
rename tensorflow_compat tensorflow_api to pose_estimation
deruyter92 Jun 26, 2026
9d22324
add missing from_future import
deruyter92 Jun 26, 2026
b3f2689
Fix _tf_routing: allow use of legacy capitalized `Shuffles` for engin…
deruyter92 Jun 26, 2026
cc546ed
rename tests to avoid naming colision
deruyter92 Jun 26, 2026
43464d3
fix merge conflix: import deprecation from core
deruyter92 Jun 26, 2026
901285e
remove deeplabcut.compat in favor of deeplabcut.api
deruyter92 Jun 26, 2026
43c1628
lazy import of get_shuffle_engine
deruyter92 Jun 26, 2026
d6e85bc
fix mock in test_tf_routing
deruyter92 Jun 26, 2026
979177b
add GUI warning when selecting TensorFlow
deruyter92 Jun 26, 2026
a1a265e
update _tf_routing allow arg config if absent from kwargs
deruyter92 Jun 26, 2026
2260e05
api/pose_estimation: update function signatures using typed configs a…
deruyter92 Jul 10, 2026
c42f397
improve lazy-loading for api.pose_estimation
deruyter92 Jul 16, 2026
79e4e15
add post_processing and refine_training to deeplabcut.api
deruyter92 Jul 16, 2026
061bb4a
update TF routing decorator: add `when` predicate
deruyter92 Jul 16, 2026
2c26ab6
move TF out of modelzoo + create api.modelzoo_inference
deruyter92 Jul 16, 2026
c6cae08
small fix for _tf_routing: drop `engine` param
deruyter92 Jul 16, 2026
49abd15
update modelzoo_inference.py
deruyter92 Jul 16, 2026
4ccfd91
move TF out modelzoo create_pretrained_project + add api
deruyter92 Jul 16, 2026
9ee4a2d
move TF out of generate_training_dataset + create api
deruyter92 Jul 16, 2026
5cdfc38
add functools wrap for tf routing decorator
deruyter92 Jul 16, 2026
5bcf4ad
remove incorrect exports in tensorflow_compat
deruyter92 Jul 16, 2026
8f753ed
restore modeloptions alias in deeplabctu.create_project.modelzoo
deruyter92 Jul 16, 2026
d68e143
improve tf_routing: use unified kwargs instead of positional args
deruyter92 Jul 16, 2026
01478be
add scope explanation in docstring api __init__
deruyter92 Jul 16, 2026
8195299
use lazy imports inside deeplabcut.api
deruyter92 Jul 16, 2026
1f9a283
add api tests
deruyter92 Jul 16, 2026
87c02f1
fix positional arg binding in tf routing + add tests
deruyter92 Jul 16, 2026
0b53726
linting
deruyter92 Jul 16, 2026
8262de5
fix ProjectConfig mock in test_apis_utils.py (should have attr access).
deruyter92 Jul 16, 2026
3687704
use centralized yaml loading / writing
deruyter92 Jul 17, 2026
dd1f177
fix `when` predicate for tf routing: use unified args
deruyter92 Jul 17, 2026
80b1168
fix falsey gputouse
deruyter92 Jul 17, 2026
b750293
copy dict for `_resolve_legacy_kwargs`
deruyter92 Jul 17, 2026
6732eb0
fix(tf_routing): normalize renamed params before engine resolution
deruyter92 Jul 17, 2026
47d6c72
pop "engine" from unified
deruyter92 Jul 17, 2026
aa4644a
add tests for TF routing
deruyter92 Jul 17, 2026
9d7e6c5
fix test_tf_routing: should NOT warn deprecation for canonical pytorc…
deruyter92 Jul 17, 2026
9cbdbbb
improve docstrings
deruyter92 Aug 9, 2026
2811e00
update TF compat: raise warning for ignored PT-only parameters
deruyter92 Aug 9, 2026
869c892
remove torch_kwargs from tf-only branch
deruyter92 Aug 9, 2026
f722b69
fix circular import risk
deruyter92 Aug 9, 2026
ca1ca72
remove lru_cache decorator: it had no performance benefits, but riske…
deruyter92 Aug 9, 2026
6cb5e8a
add tests for routing to TF
deruyter92 Aug 9, 2026
8a2907a
add tests for `_positionals_as_kwargs`
deruyter92 Aug 9, 2026
530936e
fix stale type hint for `when` parameter in `with_tensorflow_fallback`
deruyter92 Aug 20, 2026
987975b
raise for duplicate args in `_tf_routing.with_tensorflow_fallback`
deruyter92 Aug 20, 2026
c67e52d
deduplicate parameter renaming
deruyter92 Aug 20, 2026
b817755
Update `_positional_as_kwargs`: include variadic args.
deruyter92 Aug 20, 2026
e22b095
add None to `_normalize_gputouse`
deruyter92 Aug 20, 2026
40f3f61
fix `engine` param: make keyword-only and always consume during routing
deruyter92 Aug 20, 2026
3b407e2
fix `_shuffles_from_kwargs`: normalize to list.
deruyter92 Aug 20, 2026
b0f3934
update tests for `_normalize_gputouse`
deruyter92 Aug 20, 2026
9a1c77e
fix references to `deeplabcut.compat` -> rename to `deeplabcut.api`
deruyter92 Aug 20, 2026
24d0d4e
Deprecate internal `video_inference_superanimal` in favor of top-leve…
deruyter92 Aug 20, 2026
00e4ac5
add tf-routing integration tests
deruyter92 Aug 20, 2026
274b9ef
remove RST api docs references - replace with links to API docs
deruyter92 Aug 12, 2026
089f0c5
remove stale user guide files `maDLC_UserGuide.md` and `standardDeepL…
deruyter92 Aug 19, 2026
57d42f7
fix dead links in main docs - update links to new user guide
deruyter92 Aug 19, 2026
7f15358
fix dead links in notebooks - update links to new user guide
deruyter92 Aug 19, 2026
5cd76a0
centralize deprecation version markers in DeprecatedSince
deruyter92 Aug 12, 2026
ae69a2e
apply centralized deprecation version markers in DeprecatedSince
deruyter92 Aug 12, 2026
035bb61
add DeprecationRoundInfo schema and move DeprecatedSince members to D…
deruyter92 Aug 13, 2026
fa29b6a
apply new DeprecationRound enum throughout codebase
deruyter92 Aug 13, 2026
b91b5e4
Add after validator for `DeprecationInfo`
deruyter92 Aug 13, 2026
5e4c500
rename deprecation round to INIT_TF_DEPRECATION
deruyter92 Aug 20, 2026
79da86f
rename deprecation round PARAMETER_CONSISTENCY to INIT_PARAMETER_ALIA…
deruyter92 Aug 20, 2026
ef22bdb
fix tf-routing: accept ProjectConfig | dict | str | path like the mai…
deruyter92 Aug 31, 2026
6e66ffc
Fix missing `deprecation_round` in `deprecated` decorator in `video_i…
deruyter92 Aug 31, 2026
a175d75
update test for tensorflow routing
deruyter92 Aug 31, 2026
61ef5a5
show TF deprecation warning banner only once
deruyter92 Sep 3, 2026
9243129
keep engine widged synced, even when setting refuses.
deruyter92 Sep 3, 2026
8fe676b
Update deprecation marker of TensorFlow deprecation (since 3.1 remove…
deruyter92 Aug 28, 2026
1100bc7
fix tests: reset TF deprecation warning counter in conftest
deruyter92 Sep 4, 2026
6ed4ffd
resolve duplicate test names
deruyter92 Sep 3, 2026
c9f000c
Merge branch 'dev' into jaap/prepare_tf_deprecation
deruyter92 Sep 4, 2026
599f911
Merge pull request #3463 from DeepLabCut/jaap/refresh-deprecation-mar…
deruyter92 Sep 4, 2026
5d649a0
fix test_with_tensorflow_fallback: reset WARNED flag to allow re-emit…
deruyter92 Sep 4, 2026
c7b2f08
fix test tf-routing - patch repeated warnings
deruyter92 Sep 4, 2026
f7befc3
fix banner warning text formatting
deruyter92 Sep 4, 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
fix dead links in notebooks - update links to new user guide
  • Loading branch information
deruyter92 committed Sep 1, 2026
commit 7f153586362b375ea5721d3b6c518e87bd63daac
2 changes: 1 addition & 1 deletion examples/COLAB/COLAB_3miceDemo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"\n",
"- To create a full maDLC pipeline please see our full docs: https://deeplabcut.github.io/DeepLabCut/README.html\n",
"\n",
"- Of interest is a full how-to for maDLC: https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html\n",
"- Of interest is a full how-to for maDLC: https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html\n",
"- a quick guide to maDLC: https://deeplabcut.github.io/DeepLabCut/docs/quick-start/tutorial_maDLC.html\n",
"- a demo COLAB for how to use maDLC on your own data: https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_YOURDATA_maDLC_TrainNetwork_VideoAnalysis.ipynb\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/COLAB/COLAB_BUCTD_and_CTD_tracking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"Some resources that can be useful:\n",
"\n",
"- The original paper: [Zhou, Stoffl, Mathis, Mathis. \"Rethinking Pose Estimation in Crowds: Overcoming the Detection Information Bottleneck and Ambiguity.\" Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). 2023](https://openaccess.thecvf.com/content/ICCV2023/papers/Zhou_Rethinking_Pose_Estimation_in_Crowds_Overcoming_the_Detection_Information_Bottleneck_ICCV_2023_paper.pdf)\n",
"- Multi-animal user guide: [DeepLabCut's Documentation: User Guide for Multi-Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html)\n",
"- Multi-animal user guide: [DeepLabCut's Documentation: User Guide for Multi-Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html)\n",
"\n",
"Note: In this notebook, we first train a BU model. Typically, you would already have a BU model, that is not performant enough. That's why you go for the BUCTD approach.\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/COLAB/COLAB_DEMO_mouse_openfield.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Some useful links:\n",
"\n",
"- [DeepLabCut's GitHub: github.com/DeepLabCut/DeepLabCut](https://github.com/DeepLabCut/DeepLabCut)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html)\n",
"\n",
"![alt text](https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1559935526258-KFYZC8BDHK01ZIDPNVIX/mouse_skel_trail.gif?format=450w)\n",
"\n",
Expand Down Expand Up @@ -178,7 +178,7 @@
"# utilize the GPU's capabilities.\n",
"\n",
"# More info and there are more things you can set:\n",
"# https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html#g-train-the-network\n",
"# https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html#g-train-the-network\n",
"\n",
"deeplabcut.train_network(\n",
" path_config_file,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Some useful links:\n",
"\n",
"- [DeepLabCut's GitHub: github.com/DeepLabCut/DeepLabCut](https://github.com/DeepLabCut/DeepLabCut)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html)\n",
"\n",
"\n",
"This notebook illustrates how to use the cloud to:\n",
Expand All @@ -36,7 +36,7 @@
"\n",
"This notebook demonstrates the necessary steps to use DeepLabCut for your own project.\n",
"\n",
"This shows the most simple code to do so, but many of the functions have additional features, so please check out the [documentation](https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html) & the protocol paper!\n",
"This shows the most simple code to do so, but many of the functions have additional features, so please check out the [documentation](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html) & the protocol paper!\n",
"\n",
"> Nath, T., Mathis, A., Chen, A. C., Patel, A., Bethge, M., & Mathis, M. W. (2019). \n",
"> **Using DeepLabCut for 3D markerless pose estimation across species and behaviors.** \n",
Expand Down Expand Up @@ -239,7 +239,7 @@
"# utilize the GPU's capabilities.\n",
"\n",
"# More info and there are more things you can set:\n",
"# https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html#g-train-the-network\n",
"# https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html#g-train-the-network\n",
"\n",
"deeplabcut.train_network(\n",
" path_config_file,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Some useful links:\n",
"\n",
"- [DeepLabCut's GitHub: github.com/DeepLabCut/DeepLabCut](https://github.com/DeepLabCut/DeepLabCut)\n",
"- [DeepLabCut's Documentation: User Guide for Multi-Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html)\n",
"- [DeepLabCut's Documentation: User Guide for Multi-Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html)\n",
"\n",
"\n",
"![alt text](https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1628180434489-T0RIWEJJU0FJVOT6FNVD/maDLC.png?format=800w)\n",
Expand Down Expand Up @@ -165,7 +165,7 @@
"source": [
"## Create a multi-animal training dataset:\n",
"\n",
"- more info can be [found in the docs](https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html#create-training-dataset)\n",
"- more info can be [found in the docs](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html#create-training-dataset)\n",
"- please check the text below, edit if needed, and then click run (this can take some time):"
]
},
Expand Down Expand Up @@ -209,7 +209,7 @@
},
"source": [
"## Start training:\n",
"This function trains the network for a specific shuffle of the training dataset. More info can be found [in the docs](https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html#train-the-network)."
"This function trains the network for a specific shuffle of the training dataset. More info can be found [in the docs](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html#train-the-network)."
]
},
{
Expand All @@ -229,7 +229,7 @@
"# utilize the GPU's capabilities.\n",
"\n",
"# More info and there are more things you can set:\n",
"# https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html#g-train-the-network\n",
"# https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html#g-train-the-network\n",
"\n",
"deeplabcut.train_network(\n",
" path_config_file,\n",
Expand Down Expand Up @@ -262,7 +262,7 @@
"- First, we evaluate the pose estimation performance.\n",
"- This function evaluates a trained model for a specific shuffle/shuffles at a particular state or all the states on the data set (images) and stores the results as .5 and .csv file in a subdirectory under **evaluation-results-pytorch**\n",
"- If the scoremaps do not look accurate, don't proceed to tracklet assembly; please consider (1) adding more data, (2) adding more bodyparts!\n",
"- More info can be [found in the docs](https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html#evaluate-the-trained-network)\n",
"- More info can be [found in the docs](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html#evaluate-the-trained-network)\n",
"\n",
"Here is an example of what you'd aim to see before proceeding:\n",
"\n",
Expand Down Expand Up @@ -364,7 +364,7 @@
"id": "3-OgTJ0Lz20e"
},
"source": [
"If the resulting video (ends in full.mp4) is not good, we highly recommend adding more data and training again. See [here, in the docs](https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html#decision-break-point)."
"If the resulting video (ends in full.mp4) is not good, we highly recommend adding more data and training again. See [here, in the docs](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html#decision-break-point)."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/COLAB/COLAB_transformer_reID.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"- create quality check plots and video.\n",
"\n",
"### To create a full maDLC pipeline please see our full docs: https://deeplabcut.github.io/DeepLabCut/README.html\n",
"- Of interest is a full how-to for maDLC: https://deeplabcut.github.io/DeepLabCut/docs/maDLC_UserGuide.html\n",
"- Of interest is a full how-to for maDLC: https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html\n",
"- a quick guide to maDLC: https://deeplabcut.github.io/DeepLabCut/docs/quick-start/tutorial_maDLC.html\n",
"- a demo COLAB for how to use maDLC on your own data: https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/COLAB/COLAB_YOURDATA_maDLC_TrainNetwork_VideoAnalysis.ipynb\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/JUPYTER/Demo_labeledexample_MouseReaching.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Some resources that can be useful:\n",
"\n",
"- [github.com/DeepLabCut/DeepLabCut](https://github.com/DeepLabCut/DeepLabCut)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html)\n",
"\n",
"#### The notebook accompanies the following user-guide:\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/JUPYTER/Demo_labeledexample_Openfield.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Some resources that can be useful:\n",
"\n",
"- [github.com/DeepLabCut/DeepLabCut](https://github.com/DeepLabCut/DeepLabCut)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html)\n",
"\n",
"#### The notebook accompanies the following user-guide:\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/JUPYTER/Demo_yourowndata.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"Some resources that can be useful:\n",
"\n",
"- [github.com/DeepLabCut/DeepLabCut](https://github.com/DeepLabCut/DeepLabCut)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/standardDeepLabCut_UserGuide.html)\n",
"- [DeepLabCut's Documentation: User Guide for Single Animal projects](https://deeplabcut.github.io/DeepLabCut/docs/main-workflows/user-guide.html)\n",
"\n",
"This notebook demonstrates the necessary steps to use DeepLabCut for your own project.\n",
"This shows the most simple code to do so, but many of the functions have additional features, so please check out the overview & the protocol paper!\n",
Expand Down