You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When developing and testing a new agent locally following this guide, we found that there exists a case in which no default image is assigned:
Possible Patch
In execute method of AsyncAgentExecutorMixin, SerializationSettings's image_config field isn't well initialized, as shown here. Hence, the error is raised when:
container_image isn't specified in the corresponding task and
ctx.serialization_settings is None
SyncAgentExecutorMixin may have the same issue.
Expected behavior
The local test should pass even if an user doesn't explicitly specify container_image parameter in the corresponding task.
Additional context to reproduce
Test Slurm agent locally with the following example,
importosfromflytekitimportworkflowfromflytekitplugins.slurmimportSlurm, SlurmTaskecho_job=SlurmTask(
name="echo-job-name",
task_config=Slurm(
slurm_host="slurm",
# Specify a remote Slurm batch scriptbatch_script_path="/home/abaowei/echo.slurm",
batch_script_args=["--debug"],
sbatch_conf={
"partition": "debug",
"job-name": "tiny-slurm",
}
)
# No container_image is specified here
)
@workflowdefwf() ->None:
echo_job()
if__name__=="__main__":
fromflytekit.clis.sdk_in_containerimportpyflytefromclick.testingimportCliRunnerrunner=CliRunner()
path=os.path.realpath(__file__)
# Local runprint(f">>> LOCAL EXEC <<<")
result=runner.invoke(pyflyte.main, ["run", path, "wf"])
print(result.output)
Screenshots
No response
Are you sure this issue hasn't been raised already?
Yes
Have you read the Code of Conduct?
Yes
The text was updated successfully, but these errors were encountered:
Describe the bug
When developing and testing a new agent locally following this guide, we found that there exists a case in which no default image is assigned:
Possible Patch
In
execute
method ofAsyncAgentExecutorMixin
,SerializationSettings
'simage_config
field isn't well initialized, as shown here. Hence, the error is raised when:container_image
isn't specified in the corresponding task andctx.serialization_settings
isNone
SyncAgentExecutorMixin
may have the same issue.Expected behavior
The local test should pass even if an user doesn't explicitly specify
container_image
parameter in the corresponding task.Additional context to reproduce
Test Slurm agent locally with the following example,
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: