Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions deeplabcut/api/create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from collections.abc import Sequence

from deeplabcut.api._tf_routing import with_tensorflow_fallback
from deeplabcut.core.deprecation import renamed_parameter
from deeplabcut.core.deprecation import DeprecationRound, renamed_parameter
from deeplabcut.core.engine import Engine


Expand All @@ -26,7 +26,7 @@
tensorflow_module="deeplabcut.tensorflow_compat.create_project",
tensorflow_name="_tf_create_pretrained_project",
)
@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def create_pretrained_project(
project: str,
experimenter: str,
Expand Down
4 changes: 2 additions & 2 deletions deeplabcut/api/modelzoo_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
from pathlib import Path

from deeplabcut.api._tf_routing import with_tensorflow_fallback
from deeplabcut.core.deprecation import renamed_parameter
from deeplabcut.core.deprecation import DeprecationRound, renamed_parameter


@with_tensorflow_fallback(
when=lambda params: params.get("model_name") == "dlcrnet",
tensorflow_module="deeplabcut.tensorflow_compat.superanimal_inference",
tensorflow_name="video_inference_superanimal_tf",
)
@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def video_inference_superanimal(
videos: str | list,
superanimal_name: str,
Expand Down
32 changes: 19 additions & 13 deletions deeplabcut/api/pose_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


from deeplabcut.api._tf_routing import with_tensorflow_fallback
from deeplabcut.core.deprecation import deprecated, renamed_parameter
from deeplabcut.core.deprecation import DeprecationRound, deprecated, renamed_parameter


@with_tensorflow_fallback(
Expand All @@ -43,7 +43,7 @@
],
renamed_params={"keepdeconvweights": "load_head_weights"},
)
@renamed_parameter(old="displayiters", new="display_iters", since="3.0.0")
@renamed_parameter(old="displayiters", new="display_iters", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def train_network(
config: ProjectConfig | dict | Path | str,
shuffle: int = 1,
Expand Down Expand Up @@ -167,8 +167,10 @@ def return_train_network_path(


@with_tensorflow_fallback(normalize_gputouse=True, dropped_params=["rescale"])
@renamed_parameter(old="Shuffles", new="shuffles", since="3.0.0")
@renamed_parameter(old="comparisonbodyparts", new="comparison_bodyparts", since="3.0.0")
@renamed_parameter(old="Shuffles", new="shuffles", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
@renamed_parameter(
old="comparisonbodyparts", new="comparison_bodyparts", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY
)
def evaluate_network(
config: ProjectConfig | dict | Path | str,
shuffles: Iterable[int] = (1,),
Expand Down Expand Up @@ -269,8 +271,10 @@ def evaluate_network(


@with_tensorflow_fallback
@renamed_parameter(old="comparisonbodyparts", new="comparison_bodyparts", since="3.0.0")
@renamed_parameter(old="Snapindex", new="snapshotindex", since="3.0.0")
@renamed_parameter(
old="comparisonbodyparts", new="comparison_bodyparts", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY
)
@renamed_parameter(old="Snapindex", new="snapshotindex", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def return_evaluate_network_data(
config: ProjectConfig | dict | Path | str,
shuffle: int = 0,
Expand All @@ -295,8 +299,8 @@ def return_evaluate_network_data(
"use_openvino",
],
)
@renamed_parameter(old="batchsize", new="batch_size", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="batchsize", new="batch_size", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def analyze_videos(
config: ProjectConfig | dict | Path | str,
videos: str | list[str],
Expand Down Expand Up @@ -448,8 +452,8 @@ def analyze_videos(


@with_tensorflow_fallback(normalize_gputouse=True, dropped_params=["TFGPUinference"])
@renamed_parameter(old="batchsize", new="batch_size", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="batchsize", new="batch_size", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def create_tracking_dataset(
config: ProjectConfig | dict | Path | str,
videos: list[str] | list[Path],
Expand Down Expand Up @@ -600,7 +604,7 @@ def analyze_images(
)


@deprecated(replacement="deeplabcut.analyze_images", since="3.1")
@deprecated(replacement="deeplabcut.analyze_images", deprecation_round=DeprecationRound.IMAGE_ANALYSIS_MIGRATION)
@with_tensorflow_fallback(normalize_gputouse=True, dropped_params=["frametype"])
def analyze_time_lapse_frames(
config: ProjectConfig | dict | Path | str,
Expand Down Expand Up @@ -638,7 +642,7 @@ def analyze_time_lapse_frames(


@with_tensorflow_fallback(normalize_gputouse=True)
@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def convert_detections2tracklets(
config: ProjectConfig | dict | Path | str,
videos: str | list[str],
Expand Down Expand Up @@ -843,7 +847,9 @@ def visualize_paf(


@with_tensorflow_fallback(normalize_gputouse=True, renamed_params={"Indices": "indices"})
@renamed_parameter(old="comparisonbodyparts", new="comparison_bodyparts", since="3.0.0")
@renamed_parameter(
old="comparisonbodyparts", new="comparison_bodyparts", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY
)
def extract_save_all_maps(
config: ProjectConfig | dict | Path | str,
shuffle: int = 1,
Expand Down
6 changes: 3 additions & 3 deletions deeplabcut/api/post_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
from collections.abc import Sequence
from pathlib import Path

from deeplabcut.core.deprecation import renamed_parameter
from deeplabcut.core.deprecation import DeprecationRound, renamed_parameter


@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def analyzeskeleton(
config: str | Path,
videos: list[str | Path],
Expand Down Expand Up @@ -100,7 +100,7 @@ def analyzeskeleton(
)


@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def filterpredictions(
config: str | Path,
video: str | Path,
Expand Down
6 changes: 3 additions & 3 deletions deeplabcut/api/refine_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from collections.abc import Sequence
from pathlib import Path

from deeplabcut.core.deprecation import renamed_parameter
from deeplabcut.core.deprecation import DeprecationRound, renamed_parameter


def find_outliers_in_raw_data(
Expand Down Expand Up @@ -66,7 +66,7 @@ def find_outliers_in_raw_data(
)


@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def extract_outlier_frames(
config: str | Path,
videos: list[str | Path],
Expand Down Expand Up @@ -288,7 +288,7 @@ def merge_datasets(config: str | Path, forceiterate=None):
return _merge_datasets(config=config, forceiterate=forceiterate)


@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
@renamed_parameter(old="videotype", new="video_extensions", deprecation_round=DeprecationRound.PARAMETER_CONSISTENCY)
def stitch_tracklets(
config_path: str | Path,
videos: list[str | Path],
Expand Down
6 changes: 4 additions & 2 deletions deeplabcut/core/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from pydantic import ValidationError
from ruamel.yaml import YAML

from deeplabcut.core.deprecation import deprecated
from deeplabcut.core.deprecation import DeprecationRound, deprecated

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -238,7 +238,9 @@ def wrapper(*args, **kwargs):
# -----------------------------------------------------------------------------


@deprecated(replacement="deeplabcut.core.config.ProjectConfig", since="3.0.1")
@deprecated(
replacement="deeplabcut.core.config.ProjectConfig", deprecation_round=DeprecationRound.CONFIG_MODEL_MIGRATION
)
def create_config_template(multianimal: bool = False) -> tuple:
"""
Creates a template for config.yaml file. This specific order is preserved while saving as yaml file.
Expand Down
Loading