Skip to content

[BUG] Passing None type to pyflyte run command is not supported #6717

@0yukali0

Description

@0yukali0

Flyte & Flytekit version

flyteidl 1.16.1
flytekit 1.16.9

Describe the bug

I passed None to pyflyte run to trigger task which has a optional parameter.
In local mode, TypeTransformerFailedError showed up.
In remote mode, there was an error with converter.

import flytekit as fl
from typing import Optional

@fl.task()
def hello(name: Optional[int] = None):
    print(name)

Expected behavior

pyflyte run command support --var1 None in local mode and remote mode.

Additional context to reproduce

import flytekit as fl
from typing import Optional

@fl.task()
def hello(name: Optional[int] = None):
    print(name)
  1. local mode
    pyflyte run main.py hello --name None
  2. remote mode
    pyflyte run --remote main.py hello --name None

Screenshots

  1. Local mode
Image
  1. Remote mode
Image

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinguntriagedThis issues has not yet been looked at by the Maintainers

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions