Yongchan Hong
02/09/2022, 7:31 AMSamhita Alla
image_config
while initialising remote?Yongchan Hong
02/09/2022, 8:56 AMfrom flytekit.remote import FlyteRemote
remote = FlyteRemote(
default_project="flytesnacks",
default_domain="development",
flyte_admin_url="<http://flyte-dev.xtrm-data.io|flyte-dev.xtrm-data.io>",
insecure=False
)
from flytekit import kwtypes, task, workflow
from flytekit.extras.sqlite3.task import SQLite3Config, SQLite3Task
from flytekit.types.schema import FlyteSchema
EXAMPLE_DB = "<https://cdn.sqlitetutorial.net/wp-content/uploads/2018/03/chinook.zip>"
interactive_sql_task = SQLite3Task(
"basic_querying_chan",
query_template="select Trackid, Name from tracks limit {{.inputs.limit}}",
inputs=kwtypes(limit=int),
output_schema_type=FlyteSchema[kwtypes(TrackId=int, Name=str)],
task_config=SQLite3Config(
uri=EXAMPLE_DB,
compressed=True,
)
)
registered_sql_task = remote.register(my_workflow, "flytetester", "development", "basic_querying_chan", "v1")
Samhita Alla
from flytekit.core.context_manager import Image, ImageConfig
remote = FlyteRemote(
default_project="flytesnacks",
default_domain="development",
flyte_admin_url="<http://flyte-dev.xtrm-data.io|flyte-dev.xtrm-data.io>",
insecure=False,
image_config=ImageConfig(default_image=Image(name="my-image", fqn="your-image-name", tag="v1"))
)
?Yongchan Hong
02/09/2022, 9:29 AMSamhita Alla
Shouldnt we change this image_config to required then?I donāt think so cause
image_config
is required only when registering workflows. But if youād like to trigger executions using FlyteRemote, that neednāt be mandatorily given.Yongchan Hong
02/09/2022, 9:35 AMSamhita Alla
Yongchan Hong
02/09/2022, 9:41 AMSamhita Alla
Yongchan Hong
02/09/2022, 2:13 PMfrom flytekit import task, workflow
@task
def sum(x: int, y: int) -> int:
return x + y
@task
def square(z: int) -> int:
return z * z
@workflow
def my_workflow(x: int, y: int) -> int:
return sum(x=square(z=x), y=square(z=y))
And I am getting image canāt be pulled issue (Back-off pulling image āyour-image-name:v1ā) when I try to register task. When I try to register workflow, I get āerr missing entity of type TASK with identifier projectā error.
Do you know any related info? @Samhita AllaKetan (kumare3)
Yongchan Hong
02/09/2022, 3:28 PMKetan (kumare3)
Yongchan Hong
02/09/2022, 4:38 PMKetan (kumare3)
Yongchan Hong
02/09/2022, 5:01 PM