Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
68430db
Allows Secret groups to be optional and configurable (#2062)
thomasjpfan Dec 22, 2023
eab12e6
[Core feature] Allow dictionaries to be passed to execute workflows t…
jasonlai1218 Dec 22, 2023
0e8abd9
fix context usage (#2070)
troychiu Dec 26, 2023
e107994
Error when multiple configuration plugins are installed (#2069)
thomasjpfan Dec 26, 2023
452a2ec
test (#2077)
Future-Outlier Jan 2, 2024
d1ce05b
Generalized subproc_execute and added tests (#2072)
pryce-turner Jan 2, 2024
76ebae2
Improve error handling for local execution (#2068)
pingsutw Jan 3, 2024
6f613e7
Download specific files in FlyteDirectory (#2059)
pingsutw Jan 3, 2024
9bf7afa
Constraint the full fsspec family (#2087)
honnix Jan 3, 2024
5841a1e
Update default template used by pyflyte init (#2041)
neverett Jan 4, 2024
b2f3b77
Support PodTemplate in ArrayNode (#2088)
hamersaw Jan 5, 2024
9c45cb2
remove unnecessary newline in plugin readme (#2090)
douenergy Jan 6, 2024
f22cec2
add fs path exists checking (fix flyteorg/flyte#4470) (#2079)
austin362667 Jan 8, 2024
b5dbd85
add monodocs redirect banner (#2091)
cosmicBboy Jan 8, 2024
2fde2ed
Accelerator docs (#2076)
kumare3 Jan 10, 2024
b3f0c40
Remote workflow & task execution (#2094)
kumare3 Jan 10, 2024
dc35e7f
Print log links in local execution (#2097)
pingsutw Jan 10, 2024
949bc1b
Bump fonttools (#2092)
dependabot[bot] Jan 10, 2024
d451ee2
add monodocs index page in flytekit (#2100)
cosmicBboy Jan 11, 2024
3a2ab2c
add monodocs redirects to the flytekit readthedocs project (#2095)
cosmicBboy Jan 11, 2024
ed91dd1
Local Sync Agent (#2085)
Future-Outlier Jan 11, 2024
ced0daf
Bump jinja2 from 3.1.2 to 3.1.3 in /plugins/flytekit-airflow (#2103)
dependabot[bot] Jan 12, 2024
cc94d33
Bump jinja2 from 3.1.2 to 3.1.3 (#2104)
dependabot[bot] Jan 13, 2024
76f6db2
Enhance Airflow Plugin (#2099)
Future-Outlier Jan 13, 2024
729a925
Bump jinja2 from 3.1.2 to 3.1.3 in /plugins/flytekit-onnx-pytorch (#2…
dependabot[bot] Jan 13, 2024
01e2392
Bump jinja2 (#2101)
dependabot[bot] Jan 13, 2024
a3a640a
init (#2078)
Future-Outlier Jan 13, 2024
ccc515e
Fix Flyin Plugin VSCode download bug (#1991)
Future-Outlier Jan 13, 2024
892b474
Adds conda support to envd plugin (#2020)
thomasjpfan Jan 13, 2024
80ca660
Fix is_deferrable in airflow agent (#2109)
pingsutw Jan 17, 2024
1127206
Use Latest FlyteIdl in Integration Test (#2105)
Future-Outlier Jan 17, 2024
7996c2e
Changes default destination dir to be "working dir" (#2108)
kumare3 Jan 17, 2024
aaf69f8
Fix typos and run spellcheck in CI (#2074)
eapolinario Jan 18, 2024
6279b81
Add @lru_cache to ImageBuildEngine.build (#2112)
pingsutw Jan 18, 2024
11232ab
Skip errors when running pyflyte register (#2111)
pingsutw Jan 18, 2024
475eecd
Option to disable local caching (#2106)
bstadlbauer Jan 19, 2024
139fa2f
Omit '=' from auto-generated version (#2117)
eapolinario Jan 19, 2024
5ba545c
Pass in env vars in FlyteRemote register_script (#2120)
knordstrom-muon Jan 22, 2024
cba830e
[Bug] Map task caching failures (#2113)
pvditt Jan 22, 2024
0006b01
Check envd version before building images (#2122)
pingsutw Jan 23, 2024
1c8d4bd
Bump pillow from 10.1.0 to 10.2.0 (#2128)
dependabot[bot] Jan 23, 2024
f115157
Support mashumaro DataClassORJSONMixin (#2080)
quinten-flwls Jan 23, 2024
3966d1a
Extends ImageSpec to accept image names from plugin and have priority…
thomasjpfan Jan 24, 2024
cead901
Use logger in data_persistence.py (#2129)
eapolinario Jan 25, 2024
956e0be
Adjust tar method to iterate over files/dirs in dir rather than strip…
neilisaur Jan 25, 2024
de0644f
Include exception type in error messages (#2130)
Tom-Newton Jan 26, 2024
2f3e67f
just clean up basic object fields
wild-endeavor Jan 26, 2024
862e6b7
attempt 1
wild-endeavor Jan 27, 2024
73715d2
remove more service only code
wild-endeavor Jan 29, 2024
bd21a10
remove from raw
wild-endeavor Jan 29, 2024
859b0eb
Adds get_default_image into configuration plugin (#2133)
thomasjpfan Jan 29, 2024
a4975b6
Add 3.12 as classifier (#2135)
honnix Jan 29, 2024
f058663
Fixing copy-all version of tar file creation as well (#2134)
neilisaur Jan 29, 2024
e00e906
delete comments
wild-endeavor Jan 30, 2024
f9eaf55
Bump pillow from 10.1.0 to 10.2.0 in /plugins/flytekit-onnx-pytorch (…
dependabot[bot] Jan 30, 2024
e23ab57
remove stuff from remote
wild-endeavor Jan 30, 2024
d7dfbaf
Bump aiohttp from 3.8.6 to 3.9.2 (#2137)
dependabot[bot] Jan 30, 2024
b763758
Bump aiohttp from 3.9.1 to 3.9.2 in /plugins/flytekit-spark (#2140)
dependabot[bot] Jan 30, 2024
d10bda1
Bump aiohttp from 3.9.0 to 3.9.2 in /plugins/flytekit-airflow (#2139)
dependabot[bot] Jan 30, 2024
1b8ad7e
Bump aiohttp (#2138)
dependabot[bot] Jan 30, 2024
1789db9
Bump pillow from 10.1.0 to 10.2.0 in /plugins/flytekit-onnx-tensorflo…
dependabot[bot] Jan 30, 2024
781ada2
bump idl
wild-endeavor Jan 30, 2024
507ed2c
go go go
wild-endeavor Jan 30, 2024
f261eb7
move_import
wild-endeavor Jan 30, 2024
8861d0a
Envvars local execution (#2132)
eapolinario Jan 30, 2024
35f8a8c
`node_dependency_hints` for dynamic tasks (#2015)
Tom-Newton Jan 31, 2024
f89ed36
Warn user when overriding requests but not limits (#2151)
fg91 Jan 31, 2024
84fbdfe
Improve error message for pyflyte run (#2142)
pingsutw Jan 31, 2024
c63f011
Remove upper version bound from protobuf (#2144)
pingsutw Jan 31, 2024
7179d4c
Agent Metadata Servicer (#2012)
Future-Outlier Jan 31, 2024
7c51753
lints
wild-endeavor Jan 31, 2024
3b89dc8
Fix: Improve error handling in workflow compilation when output bindi…
fg91 Jan 31, 2024
d78677a
lint plus test
wild-endeavor Jan 31, 2024
cb14099
merge master
wild-endeavor Jan 31, 2024
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
2 changes: 2 additions & 0 deletions dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ pandas
scikit-learn
types-requests
prometheus-client

orjson
10 changes: 5 additions & 5 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ adlfs==2023.9.0
# via flytekit
aiobotocore==2.5.4
# via s3fs
aiohttp==3.8.6
aiohttp==3.9.2
# via
# adlfs
# aiobotocore
Expand Down Expand Up @@ -69,9 +69,7 @@ cfgv==3.4.0
chardet==5.2.0
# via binaryornot
charset-normalizer==3.3.2
# via
# aiohttp
# requests
# via requests
click==8.1.7
# via
# cookiecutter
Expand Down Expand Up @@ -316,6 +314,8 @@ oauthlib==3.2.2
# requests-oauthlib
opt-einsum==3.3.0
# via tensorflow
orjson==3.9.12
# via -r dev-requirements.in
packaging==23.2
# via
# docker
Expand All @@ -329,7 +329,7 @@ parso==0.8.3
# via jedi
pexpect==4.8.0
# via ipython
pillow==10.1.0
pillow==10.2.0
# via -r dev-requirements.in
platformdirs==3.11.0
# via virtualenv
Expand Down
2 changes: 1 addition & 1 deletion doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ adlfs==2023.9.0
# via flytekit
aiobotocore==2.5.4
# via s3fs
aiohttp==3.9.1
aiohttp==3.9.2
# via
# adlfs
# aiobotocore
Expand Down
7 changes: 0 additions & 7 deletions flytekit/clients/friendly.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from flyteidl.admin import task_pb2 as _task_pb2
from flyteidl.admin import workflow_attributes_pb2 as _workflow_attributes_pb2
from flyteidl.admin import workflow_pb2 as _workflow_pb2
from flyteidl.artifact import artifacts_pb2
from flyteidl.service import dataproxy_pb2 as _data_proxy_pb2
from google.protobuf.duration_pb2 import Duration

Expand Down Expand Up @@ -1037,9 +1036,3 @@ def get_data(self, flyte_uri: str) -> _data_proxy_pb2.GetDataResponse:

resp = self._dataproxy_stub.GetData(req, metadata=self._metadata)
return resp

def create_artifact(self, request: artifacts_pb2.CreateArtifactRequest) -> artifacts_pb2.CreateArtifactResponse:
return self._artifact_stub.CreateArtifact(request)

def get_artifact(self, request: artifacts_pb2.GetArtifactRequest) -> artifacts_pb2.GetArtifactResponse:
return self._artifact_stub.GetArtifact(request)
2 changes: 0 additions & 2 deletions flytekit/clients/raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import grpc
from flyteidl.admin.project_pb2 import ProjectListRequest
from flyteidl.admin.signal_pb2 import SignalList, SignalListRequest, SignalSetRequest, SignalSetResponse
from flyteidl.artifact import artifacts_pb2_grpc as artifact_service
from flyteidl.service import admin_pb2_grpc as _admin_service
from flyteidl.service import dataproxy_pb2 as _dataproxy_pb2
from flyteidl.service import dataproxy_pb2_grpc as dataproxy_service
Expand Down Expand Up @@ -53,7 +52,6 @@ def __init__(self, cfg: PlatformConfig, **kwargs):
self._stub = _admin_service.AdminServiceStub(self._channel)
self._signal = signal_service.SignalServiceStub(self._channel)
self._dataproxy_stub = dataproxy_service.DataProxyServiceStub(self._channel)
self._artifact_stub = artifact_service.ArtifactRegistryStub(self._channel)

logger.info(
f"Flyte Client configured -> {self._cfg.endpoint} in {'insecure' if self._cfg.insecure else 'secure'} mode."
Expand Down
10 changes: 10 additions & 0 deletions flytekit/clis/sdk_in_container/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@
callback=key_value_callback,
help="Environment variables to set in the container, of the format `ENV_NAME=ENV_VALUE`",
)
@click.option(
"--skip-errors",
"--skip-error",
default=False,
is_flag=True,
help="Skip errors during registration. This is useful when registering multiple packages and you want to skip "
"errors for some packages.",
)
@click.argument("package-or-module", type=click.Path(exists=True, readable=True, resolve_path=True), nargs=-1)
@click.pass_context
def register(
Expand All @@ -135,6 +143,7 @@ def register(
dry_run: bool,
activate_launchplans: bool,
env: typing.Optional[typing.Dict[str, str]],
skip_errors: bool,
):
"""
see help
Expand Down Expand Up @@ -187,6 +196,7 @@ def register(
env=env,
dry_run=dry_run,
activate_launchplans=activate_launchplans,
skip_errors=skip_errors,
)
except Exception as e:
raise e
5 changes: 5 additions & 0 deletions flytekit/clis/sdk_in_container/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ def _run(*args, **kwargs):

if not run_level_params.is_remote:
with FlyteContextManager.with_context(_update_flyte_context(run_level_params)):
if run_level_params.envvars:
for env_var, value in run_level_params.envvars.items():
os.environ[env_var] = value
output = entity(**inputs)
if inspect.iscoroutine(output):
# TODO: make eager mode workflows run with local-mode
Expand Down Expand Up @@ -792,6 +795,8 @@ def get_command(self, ctx, exe_entity):
is_workflow = False
if self._entities:
is_workflow = exe_entity in self._entities.workflows
if not os.path.exists(self._filename):
raise ValueError(f"File {self._filename} does not exist")
rel_path = os.path.relpath(self._filename)
if rel_path.startswith(".."):
raise ValueError(
Expand Down
8 changes: 6 additions & 2 deletions flytekit/clis/sdk_in_container/serve.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from concurrent import futures

import rich_click as click
from flyteidl.service.agent_pb2_grpc import add_AsyncAgentServiceServicer_to_server
from flyteidl.service.agent_pb2_grpc import (
add_AgentMetadataServiceServicer_to_server,
add_AsyncAgentServiceServicer_to_server,
)
from grpc import aio


Expand Down Expand Up @@ -49,7 +52,7 @@ def agent(_: click.Context, port, worker, timeout):

async def _start_grpc_server(port: int, worker: int, timeout: int):
click.secho("Starting up the server to expose the prometheus metrics...", fg="blue")
from flytekit.extend.backend.agent_service import AsyncAgentService
from flytekit.extend.backend.agent_service import AgentMetadataService, AsyncAgentService

try:
from prometheus_client import start_http_server
Expand All @@ -61,6 +64,7 @@ async def _start_grpc_server(port: int, worker: int, timeout: int):
server = aio.server(futures.ThreadPoolExecutor(max_workers=worker))

add_AsyncAgentServiceServicer_to_server(AsyncAgentService(), server)
add_AgentMetadataServiceServicer_to_server(AgentMetadataService(), server)

server.add_insecure_port(f"[::]:{port}")
await server.start()
Expand Down
16 changes: 16 additions & 0 deletions flytekit/configuration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,22 @@ def auto(cls, config_file: typing.Union[str, ConfigFile] = None) -> DataConfig:
)


@dataclass(init=True, repr=True, eq=True, frozen=True)
class LocalConfig(object):
"""
Any configuration specific to local runs.
"""

cache_enabled: bool = True

@classmethod
def auto(cls, config_file: typing.Union[str, ConfigFile] = None) -> LocalConfig:
config_file = get_config_file(config_file)
kwargs = {}
kwargs = set_if_exists(kwargs, "cache_enabled", _internal.Local.CACHE_ENABLED.read(config_file))
return LocalConfig(**kwargs)


@dataclass(init=True, repr=True, eq=True, frozen=True)
class Config(object):
"""
Expand Down
8 changes: 8 additions & 0 deletions flytekit/configuration/default_images.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import enum
import sys
import typing
from contextlib import suppress


class PythonVersion(enum.Enum):
Expand All @@ -26,6 +27,13 @@ class DefaultImages(object):

@classmethod
def default_image(cls) -> str:
from flytekit.configuration.plugin import get_plugin

with suppress(AttributeError):
default_image = get_plugin().get_default_image()
if default_image is not None:
return default_image

return cls.find_image_for()

@classmethod
Expand Down
5 changes: 5 additions & 0 deletions flytekit/configuration/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ class AZURE(object):
CLIENT_SECRET = ConfigEntry(LegacyConfigEntry(SECTION, "client_secret"))


class Local(object):
SECTION = "local"
CACHE_ENABLED = ConfigEntry(LegacyConfigEntry(SECTION, "cache_enabled", bool))


class Credentials(object):
SECTION = "credentials"
COMMAND = ConfigEntry(LegacyConfigEntry(SECTION, "command", list), YamlConfigEntry("admin.command", list))
Expand Down
9 changes: 9 additions & 0 deletions flytekit/configuration/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def configure_pyflyte_cli(main: Group) -> Group:
def secret_requires_group() -> bool:
"""Return True if secrets require group entry."""

@staticmethod
def get_default_image() -> Optional[str]:
"""Get default image. Return None to use the images from flytekit.configuration.DefaultImages"""


class FlytekitPlugin:
@staticmethod
Expand Down Expand Up @@ -71,6 +75,11 @@ def secret_requires_group() -> bool:
"""Return True if secrets require group entry."""
return True

@staticmethod
def get_default_image() -> Optional[str]:
"""Get default image. Return None to use the images from flytekit.configuration.DefaultImages"""
return None


def _get_plugin_from_entrypoint():
"""Get plugin from entrypoint."""
Expand Down
5 changes: 3 additions & 2 deletions flytekit/core/array_node_map_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ def __init__(
f = actual_task.lhs
else:
_, mod, f, _ = tracker.extract_task_module(cast(PythonFunctionTask, actual_task).task_function)
sorted_bounded_inputs = ",".join(sorted(self._bound_inputs))
h = hashlib.md5(
f"{collection_interface.__str__()}{concurrency}{min_successes}{min_success_ratio}".encode("utf-8")
f"{sorted_bounded_inputs}{concurrency}{min_successes}{min_success_ratio}".encode("utf-8")
).hexdigest()
self._name = f"{mod}.map_{f}_{h}-arraynode"

Expand Down Expand Up @@ -387,7 +388,7 @@ def load_task(self, loader_args: List[str], max_concurrency: int = 0) -> ArrayNo
def loader_args(self, settings: SerializationSettings, t: ArrayNodeMapTask) -> List[str]: # type:ignore
return [
"vars",
f'{",".join(t.bound_inputs)}',
f'{",".join(sorted(t.bound_inputs))}',
"resolver",
t.python_function_task.task_resolver.location,
*t.python_function_task.task_resolver.loader_args(settings, t.python_function_task),
Expand Down
Loading