aws / aws/sagemaker-python-sdk

Make all Pipeline Parameters hashable

Abierto
#4,601 0 comentarios 0 reacciones 1 asignado Reclamado por @mollyheamazon Ver en GitHub
component: pipelines type: feature request
Lenguaje dominante
Python
Estrellas
2.3k
Forks
1.3k
Merge medio
1 d 22 h
PR fusionados (30 d)
35

Descripción

**Describe the feature you'd like**

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:

```python
class ParameterString(Parameter):
# ...
def __hash__(self):
"""Hash function for parameter types"""
return hash(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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.