acoustic-carpenter-78188
03/02/2023, 5:19 PM@dataclass_json
@dataclass
class Hyperparams(object):
param_dict: Dict[str, str] # Used e.g. to pass additional kwargs
# ... more hyper parameters
@task
def train(
hparams: Hyperparams,
) -> str:
print(hparams)
@workflow
def workflow(
hparams: Hyperparams = Hyperparams(
param_dict={"foo": "bar"}
),
) -> None:
train(
hparams=hparams,
)
Screenshots
In the Flyteconsole, the name of the dict is displayed instead of the key:
Screenshot 2022-11-14 at 16 48 34▾
Screenshot 2022-11-14 at 16 49 03▾
param_dict (string) field:
Screenshot 2022-11-14 at 16 49 18▾
Screenshot 2022-11-14 at 16 49 39▾
image: <http://cr.flyte.org/flyteorg/flyteconsole-release:v1.2.0|cr.flyte.org/flyteorg/flyteconsole-release:v1.2.0>.
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteacoustic-carpenter-78188
03/02/2023, 5:19 PM