L godlike
07/11/2023, 3:54 AMKevin Su
07/11/2023, 3:58 AML godlike
07/11/2023, 3:58 AMfrom flytekit.remote import FlyteRemote
from flytekit.configuration import Config, ImageConfig
from workflows.example import wf
from flytekit import ImageSpec
remote = FlyteRemote(config=Config.auto(), \
default_project="flytesnacks", default_domain="development")
execution = remote.execute(wf, \
inputs={"name": "Kermit"},\
image_config=ImageConfig("futureoutlier/flyte-practice:latest"))
from flytekit.configuration import SerializationSettings
flyte_entity = wf
flyte_workflow = remote.register_workflow(
entity=flyte_entity,
serialization_settings=SerializationSettings(
image_config=ImageConfig("futureoutlier/flyte-practice:latest"),
project="flytesnacks",
domain="development",
version="v1" # You need to specify the version here.
),
)
And get the error
python remote_register.py
╭─────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────╮
│ /mnt/c/code/flyte/intro/my_project/remote_register.py:26 in <module> │
│ │
│ ❱ 26 flyte_workflow = remote.register_workflow( │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/remote/remote.py:747 in register_workflow │
│ │
│ ❱ 747 │ │ ident = self._serialize_and_register(entity, serialization_settings, version, op │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/remote/remote.py:676 in _serialize_and_register │
│ │
│ ❱ 676 │ │ _ = get_serializable(m, settings=serialization_settings, entity=entity, options= │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/tools/translator.py:655 in get_serializable │
│ │
│ ❱ 655 │ │ cp_entity = get_serializable_workflow(entity_mapping, settings, entity, options) │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/tools/translator.py:236 in get_serializable_workflow │
│ │
│ ❱ 236 │ │ serialized_nodes.append(get_serializable(entity_mapping, settings, n, options)) │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/tools/translator.py:658 in get_serializable │
│ │
│ ❱ 658 │ │ cp_entity = get_serializable_node(entity_mapping, settings, entity, options) │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/tools/translator.py:420 in get_serializable_node │
│ │
│ ❱ 420 │ │ task_spec = get_serializable(entity_mapping, settings, entity.flyte_entity, opti │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/tools/translator.py:652 in get_serializable │
│ │
│ ❱ 652 │ │ cp_entity = get_serializable_task(settings, entity) │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/tools/translator.py:177 in get_serializable_task │
│ │
│ ❱ 177 │ container = entity.get_container(settings) │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/core/python_auto_container.py:177 in get_container │
│ │
│ ❱ 177 │ │ │ return self._get_container(settings) │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/core/python_auto_container.py:188 in _get_container │
│ │
│ ❱ 188 │ │ │ image=get_registerable_container_image(self.container_image, settings.image_ │
│ │
│ /root/miniconda3/envs/flyte/lib/python3.8/site-packages/flytekit/core/python_auto_container.py:296 in get_registerable_container_image │
│ │
│ ❱ 296 │ return f"{cfg.default_image.fqn}:{cfg.default_image.tag}" │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'str' object has no attribute 'fqn'
Can anyone give me some hint or guide me what's going on ?
Thank you very much !Kevin Su
07/11/2023, 8:42 AMImageConfig.auto(img_name="futureoutlier/flyte-practice:latest")
L godlike
07/11/2023, 9:08 AM