File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,9 @@ def __init__(
8686 self ._max = max
8787 self ._sum = sum
8888 self ._mean = mean
89- self ._std_dev = std_dev
89+ # Accept the legacy lowercase ``stddev`` key (e.g. from backend payloads
90+ # or older callers) so the rename to ``std_dev`` stays backward compatible.
91+ self ._std_dev = std_dev if std_dev is not None else kwargs .get ("stddev" )
9092 self ._percentiles = percentiles
9193 self ._distinctness = distinctness
9294 self ._entropy = entropy
Original file line number Diff line number Diff line change 2121from typing import TYPE_CHECKING , Any
2222
2323import humps
24- from hopsworks_apigen import public
24+ from hopsworks_apigen import deprecated , public
2525
2626
2727if TYPE_CHECKING :
@@ -65,7 +65,9 @@ def __init__(
6565 self ._max = max
6666 self ._sum = sum
6767 self ._mean = mean
68- self ._std_dev = std_dev
68+ # Accept the legacy lowercase ``stddev`` key (e.g. from backend payloads
69+ # or older callers) so the rename to ``std_dev`` stays backward compatible.
70+ self ._std_dev = std_dev if std_dev is not None else kwargs .get ("stddev" )
6971 self ._percentiles = percentiles
7072 self ._distinctness = distinctness
7173 self ._entropy = entropy
@@ -157,6 +159,18 @@ def std_dev(self) -> float | None:
157159 """Standard deviation of the feature values."""
158160 return self ._std_dev
159161
162+ @public
163+ @property
164+ @deprecated (
165+ "hsfs.transformation_statistics.FeatureTransformationStatistics.std_dev"
166+ )
167+ def stddev (self ) -> float | None :
168+ """Standard deviation of the feature values.
169+
170+ Deprecated alias for [`std_dev`][hsfs.transformation_statistics.FeatureTransformationStatistics.std_dev].
171+ """
172+ return self ._std_dev
173+
160174 @public
161175 @property
162176 def percentiles (self ) -> Mapping [str , float ] | None :
You can’t perform that action at this time.
0 commit comments