aws / aws/sagemaker-python-sdk

Make all Pipeline Parameters hashable

オープン
#4,601 コメント 0 件 リアクション 0 件 担当者 1 名 @mollyheamazon が担当を希望しています GitHub で見る
component: pipelines type: feature request
主要言語
Python
スター
2.3k
フォーク
1.3k
平均マージ
1日 22時間
マージ済み PR(30日)
35

説明

**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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。