Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Link to data doc in FlyteFile #877

Merged
merged 2 commits into from
Mar 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions flytekit/types/file/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@ class FlyteFile(os.PathLike, typing.Generic[T]):
the contents of the files to the blob store connected with your Flyte installation. That is, the Python native
literal that represents a file is typically just the path to the file on the local filesystem. However in Flyte,
an instance of a file is represented by a :py:class:`Blob <flytekit.models.literals.Blob>` literal,
with the ``uri`` field set to the location in the Flyte blob store (AWS/GCS etc.).
with the ``uri`` field set to the location in the Flyte blob store (AWS/GCS etc.). Take a look at the
:std:ref:`data handling doc <flyte:divedeep-data-management>` for a deeper discussion.

We decided to not support ``pathlib.Path`` as an input/output type because if you wanted the automatic
upload/download behavior, you should just use the ``FlyteFile`` type. If you do not, then a ``str`` works just as
well.

The prefix for where uploads go is set by the raw output data prefix setting, which should be set at registration
time. See the flytectl option for more information.
time in the launch plan. See the option listed under ``flytectl register examples --help`` for more information.
If not set in the launch plan, then your Flyte backend will specify a default. This default is itself configurable
as well. Contact your Flyte platform administrators to change or ascertain the value.

In short, if a task returns ``"/path/to/file"`` and the task's signature is set to return ``FlyteFile``, then the
contents of ``/path/to/file`` are uploaded.
Expand Down