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

Data subsystem #1526

Merged
merged 25 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6f5d375
wip
kumare3 Jan 4, 2023
fe74900
more wip
kumare3 Jan 16, 2023
e69317f
Data subsystem yt (#1518)
wild-endeavor Feb 28, 2023
476a0c1
merge master
wild-endeavor Mar 2, 2023
236441d
use origin master doc reqs
wild-endeavor Mar 2, 2023
0f0f467
remove hack, add version of fsspec that obviates the hack
wild-endeavor Mar 2, 2023
9517444
add more dependencies
wild-endeavor Mar 2, 2023
3c393ea
add a couple asserts
wild-endeavor Mar 2, 2023
be00445
fix extend import
wild-endeavor Mar 2, 2023
6bdde28
loosen restrictions so docs tests pass
wild-endeavor Mar 2, 2023
6324a54
windows tests (#1533)
wild-endeavor Mar 3, 2023
a2ab204
Merge branch 'data-subsystem' of github.com:flyteorg/flytekit into da…
wild-endeavor Mar 3, 2023
15bcf26
Data subsystem use fsspec (#1531)
wild-endeavor Mar 4, 2023
d7846e3
revert weird dockerfile change
wild-endeavor Mar 4, 2023
c44f164
empty out fsspec plugin init
wild-endeavor Mar 4, 2023
085c64c
remove fsspec entrypoint
wild-endeavor Mar 4, 2023
0bb0a02
add a dummy test
wild-endeavor Mar 8, 2023
8efd615
merge master
wild-endeavor Mar 8, 2023
d17f3bc
upgrade to released fsspec version, add to a test, add dockerfile.dev
wild-endeavor Mar 9, 2023
b417d60
Use fsspec placeholder for structured dataset (#1543)
wild-endeavor Mar 9, 2023
6ae2606
merge master
wild-endeavor Mar 10, 2023
bbac686
felix change prefer FLYTE_ env var
wild-endeavor Mar 10, 2023
1fa1d02
comment out tests for now... they are failing
wild-endeavor Mar 10, 2023
1149b7c
mock os.environ directly
wild-endeavor Mar 10, 2023
e9674e3
fix for windows
wild-endeavor Mar 10, 2023
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
38 changes: 38 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This Dockerfile is here to help with end-to-end testing
# From flytekit
# $ docker build -f Dockerfile.dev --build-arg PYTHON_VERSION=3.10 -t localhost:30000/flytekittest:someversion .
# $ docker push localhost:30000/flytekittest:someversion
# From your test user code
# $ pyflyte run --image localhost:30000/flytekittest:someversion

ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}-slim-buster

MAINTAINER Flyte Team <[email protected]>
LABEL org.opencontainers.image.source https://github.com/flyteorg/flytekit

WORKDIR /root
ENV PYTHONPATH /root

ARG VERSION
ARG DOCKER_IMAGE

RUN apt-get update && apt-get install build-essential vim -y

COPY . /code/flytekit
WORKDIR /code/flytekit

# Pod tasks should be exposed in the default image
RUN pip install -e .
RUN pip install -e plugins/flytekit-k8s-pod
RUN pip install -e plugins/flytekit-deck-standard
RUN pip install scikit-learn

ENV PYTHONPATH "/code/flytekit:/code/flytekit/plugins/flytekit-k8s-pod:/code/flytekit/plugins/flytekit-deck-standard:"

WORKDIR /root
RUN useradd -u 1000 flytekit
RUN chown flytekit: /root
USER flytekit

ENV FLYTE_INTERNAL_IMAGE "$DOCKER_IMAGE"
2 changes: 1 addition & 1 deletion doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ frozenlist==1.3.3
# via
# aiosignal
# ray
fsspec==2023.1.0
fsspec==2023.3.0
# via
# -r doc-requirements.in
# dask
Expand Down
2 changes: 0 additions & 2 deletions flytekit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@
from flytekit.core.condition import conditional
from flytekit.core.container_task import ContainerTask
from flytekit.core.context_manager import ExecutionParameters, FlyteContext, FlyteContextManager
from flytekit.core.data_persistence import DataPersistence, DataPersistencePlugins
from flytekit.core.dynamic_workflow_task import dynamic
from flytekit.core.gate import approve, sleep, wait_for_input
from flytekit.core.hash import HashMethod
Expand All @@ -223,7 +222,6 @@
from flytekit.core.workflow import WorkflowFailurePolicy, reference_workflow, workflow
from flytekit.deck import Deck
from flytekit.extras import pytorch, sklearn, tensorflow
from flytekit.extras.persistence import GCSPersistence, HttpPersistence, S3Persistence
from flytekit.loggers import logger
from flytekit.models.common import Annotations, AuthRole, Labels
from flytekit.models.core.execution import WorkflowExecutionPhase
Expand Down
2 changes: 1 addition & 1 deletion flytekit/configuration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class PlatformConfig(object):
This object contains the settings to talk to a Flyte backend (the DNS location of your Admin server basically).

:param endpoint: DNS for Flyte backend
:param insecure: Whether to use SSL
:param insecure: Whether or not to use SSL
:param insecure_skip_verify: Whether to skip SSL certificate verification
:param console_endpoint: endpoint for console if different from Flyte backend
:param command: This command is executed to return a token using an external process
Expand Down
4 changes: 2 additions & 2 deletions flytekit/core/checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def save(self, cp: typing.Union[Path, str, io.BufferedReader]):
fa.upload_directory(str(cp), self._checkpoint_dest)
else:
fname = cp.stem + cp.suffix
rpath = fa._default_remote.construct_path(False, False, self._checkpoint_dest, fname)
rpath = fa._default_remote.sep.join([str(self._checkpoint_dest), fname])
fa.upload(str(cp), rpath)
return

Expand All @@ -138,7 +138,7 @@ def save(self, cp: typing.Union[Path, str, io.BufferedReader]):
with dest_cp.open("wb") as f:
f.write(cp.read())

rpath = fa._default_remote.construct_path(False, False, self._checkpoint_dest, self.TMP_DST_PATH)
rpath = fa._default_remote.sep.join([str(self._checkpoint_dest), self.TMP_DST_PATH])
fa.upload(str(dest_cp), rpath)

def read(self) -> typing.Optional[bytes]:
Expand Down
6 changes: 2 additions & 4 deletions flytekit/core/context_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Builder(object):
decks: List[Deck]
raw_output_prefix: Optional[str] = None
execution_id: typing.Optional[_identifier.WorkflowExecutionIdentifier] = None
working_dir: typing.Optional[utils.AutoDeletingTempDir] = None
working_dir: typing.Optional[str] = None
checkpoint: typing.Optional[Checkpoint] = None
execution_date: typing.Optional[datetime] = None
logging: Optional[_logging.Logger] = None
Expand Down Expand Up @@ -202,12 +202,10 @@ def raw_output_prefix(self) -> str:
return self._raw_output_prefix

@property
def working_directory(self) -> utils.AutoDeletingTempDir:
def working_directory(self) -> str:
"""
A handle to a special working directory for easily producing temporary files.

TODO: Usage examples
TODO: This does not always return a AutoDeletingTempDir
"""
return self._working_directory

Expand Down
Loading