You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain operations in Python require hashable objects. While sagemaker.workflow.parameters.ParameterString is hashable, other data types such as ParameterInteger, ParameterBoolean or ParameterFloat are not hashable. To me, it's unclear why only string parameters should be washable, as the underlaying method __hash__(self) could apparently easily be implemented at the sagemaker.workflow.parameters.Parameter instead at sagemaker.workflow.parameters.ParameterString. Currently, it's implemented like this:
classParameterString(Parameter):
# ... def__hash__(self):
"""Hash function for parameter types"""returnhash(tuple(self.to_request()))
How would this feature be used? Please describe.
Use non-string parameters in places where a hashable object is required, e.g. dict keys.
Describe alternatives you've considered
Use ParameterString everywhere, even when the underlaying data type is not actually a string.
The text was updated successfully, but these errors were encountered:
Describe the feature you'd like
Certain operations in Python require hashable objects. While
sagemaker.workflow.parameters.ParameterString
is hashable, other data types such asParameterInteger
,ParameterBoolean
orParameterFloat
are not hashable. To me, it's unclear why only string parameters should be washable, as the underlaying method__hash__(self)
could apparently easily be implemented at thesagemaker.workflow.parameters.Parameter
instead atsagemaker.workflow.parameters.ParameterString
. Currently, it's implemented like this:How would this feature be used? Please describe.
Use non-string parameters in places where a hashable object is required, e.g. dict keys.
Describe alternatives you've considered
Use
ParameterString
everywhere, even when the underlaying data type is not actually a string.The text was updated successfully, but these errors were encountered: