Skip to content

Add FileDownloadConfig annotation for FlyteFile inputs#8

Open
ddl-rliu wants to merge 2 commits into1.15.4-dominofrom
rliu.DOM-75010.file-ext3
Open

Add FileDownloadConfig annotation for FlyteFile inputs#8
ddl-rliu wants to merge 2 commits into1.15.4-dominofrom
rliu.DOM-75010.file-ext3

Conversation

@ddl-rliu
Copy link
Copy Markdown

@ddl-rliu ddl-rliu commented Mar 25, 2026

Upstream: flyteorg#3406

Port new BlobType fields file_extension and enable_legacy_filename to flytekit. FlyteFile inputs can be annotated with the FileDownloadConfig annotation to configure the file extension to use during the copilot download phase.

e.g.

def t1(file: Annotated[FlyteFile, FileDownloadConfig(file_extension="csv")]):
    ... # copilot downloads the file to e.g. /inputs/file.csv

versus...

def t1(file: FlyteFile["csv"]):
    ... # copilot downloads the file to e.g. /inputs/file

Full context at flyteorg/flyte#7009

Tracking issue

Closes flyteorg/flyte#7024

Why are the changes needed?

What changes were proposed in this pull request?

https://github.com/cerebrotech/train-flyteadmin-docker/pull/121
https://github.com/cerebrotech/train-flytecopilot-docker/pull/101
#8
#9
https://github.com/cerebrotech/train-flyte-library/pull/78
https://github.com/cerebrotech/compute-environment-builder/pull/933
Changes manually tested at https://github.com/cerebrotech/compute-environment-builder/pull/933#issue-4139089260

see also
dominodatalab/flyte#2
dominodatalab/flyte#3

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Port new BlobType fields file_extension and enable_legacy_filename to flytekit.
FlyteFile inputs can be annotated with the FileDownloadConfig annotation to
configure the file extension to use during the copilot download phase.

e.g.

```python
def t1(file: Annotated[FlyteFile, FileDownloadConfig(file_extension="csv")]):
    ... # copilot downloads the file to e.g. /inputs/file.csv

versus...

def t1(file: FlyteFile["csv"]):
    ... # copilot downloads the file to e.g. /inputs/file
```
@ddl-rliu ddl-rliu force-pushed the rliu.DOM-75010.file-ext3 branch from b38b9d3 to 3d21883 Compare March 26, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants