From f7a65c54ee4df506260f588b8dbc7232d527f137 Mon Sep 17 00:00:00 2001 From: Huong Nguyen <32060364+Huongg@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:40:34 +0000 Subject: [PATCH] feat(datasets): add deprecation warning for tracking datatsets (#955) * add deprecation warning for tracking datatsets Signed-off-by: Huong Nguyen * update release note Signed-off-by: Huong Nguyen * Update kedro-datasets/RELEASE.md Co-authored-by: Merel Theisen <49397448+merelcht@users.noreply.github.com> Signed-off-by: Huong Nguyen <32060364+Huongg@users.noreply.github.com> * Fix linting Signed-off-by: Merel Theisen --------- Signed-off-by: Huong Nguyen Signed-off-by: Huong Nguyen <32060364+Huongg@users.noreply.github.com> Signed-off-by: Merel Theisen Co-authored-by: Huong Nguyen Co-authored-by: Merel Theisen <49397448+merelcht@users.noreply.github.com> Co-authored-by: Merel Theisen --- kedro-datasets/RELEASE.md | 1 + kedro-datasets/kedro_datasets/tracking/__init__.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/kedro-datasets/RELEASE.md b/kedro-datasets/RELEASE.md index bfd273e31..fec3a2107 100755 --- a/kedro-datasets/RELEASE.md +++ b/kedro-datasets/RELEASE.md @@ -14,6 +14,7 @@ ## Bug fixes and other changes - Implemented Snowflake's (local testing framework)[https://docs.snowflake.com/en/developer-guide/snowpark/python/testing-locally] for testing purposes - Improved the dependency management for Spark-based datasets by refactoring the Spark and Databricks utility functions used across the datasets. +- Add deprecation warning for `tracking.MetricsDataset` and `tracking.JSONDataset`. ## Breaking Changes - Demoted `video.VideoDataset` from core to experimental dataset. diff --git a/kedro-datasets/kedro_datasets/tracking/__init__.py b/kedro-datasets/kedro_datasets/tracking/__init__.py index 6ea2eee13..1b1a5c70d 100644 --- a/kedro-datasets/kedro_datasets/tracking/__init__.py +++ b/kedro-datasets/kedro_datasets/tracking/__init__.py @@ -1,9 +1,12 @@ """Dataset implementations to save data for Kedro Experiment Tracking.""" +import warnings from typing import Any import lazy_loader as lazy +from kedro_datasets import KedroDeprecationWarning + # https://github.com/pylint-dev/pylint/issues/4300#issuecomment-1043601901 JSONDataset: Any MetricsDataset: Any @@ -15,3 +18,9 @@ "metrics_dataset": ["MetricsDataset"], }, ) + +warnings.warn( + "`tracking.JSONDataset` and `tracking.MetricsDataset` are deprecated. These datasets will be removed in kedro-datasets 7.0.0", + KedroDeprecationWarning, + stacklevel=2, +)