Skip to content

Commit b8ee989

Browse files
committed
fix: deprecate tag methods on Association
1 parent e521b87 commit b8ee989

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sagemaker/lineage/association.py

+10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
from sagemaker.lineage import _api_types
2121
from sagemaker.lineage._api_types import AssociationSummary
2222

23+
import logging
24+
25+
logger = logging.getLogger(__name__)
26+
2327

2428
class Association(_base_types.Record):
2529
"""An Amazon SageMaker artifact, which is part of a SageMaker lineage.
@@ -73,6 +77,9 @@ def set_tag(self, tag=None):
7377
Returns:
7478
list({str:str}): a list of key value pairs
7579
"""
80+
logger.warning(
81+
"set_tag on Association is deprecated. Use set_tag on the source or destination entity instead."
82+
)
7683
return self._set_tags(resource_arn=self.source_arn, tags=[tag])
7784

7885
def set_tags(self, tags=None):
@@ -84,6 +91,9 @@ def set_tags(self, tags=None):
8491
Returns:
8592
list({str:str}): a list of key value pairs
8693
"""
94+
logger.warning(
95+
"set_tags on Association is deprecated. Use set_tags on the source or destination entity instead."
96+
)
8797
return self._set_tags(resource_arn=self.source_arn, tags=tags)
8898

8999
@classmethod

0 commit comments

Comments
 (0)