From 515295eebebcd35c78e106fcb689433e1b1772a8 Mon Sep 17 00:00:00 2001 From: ArtoLord Date: Thu, 5 Oct 2023 15:28:30 +0300 Subject: [PATCH] WIP --- .../main/proto/ai/lzy/v1/workflow/workflow.proto | 14 ++++++++------ .../java/ai/lzy/service/config/ClientVersions.java | 2 +- model/src/main/proto/ai/lzy/v1/common/env.proto | 12 +++++++++--- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lzy-api/src/main/proto/ai/lzy/v1/workflow/workflow.proto b/lzy-api/src/main/proto/ai/lzy/v1/workflow/workflow.proto index 98abf06c73..a988f48fcc 100644 --- a/lzy-api/src/main/proto/ai/lzy/v1/workflow/workflow.proto +++ b/lzy-api/src/main/proto/ai/lzy/v1/workflow/workflow.proto @@ -35,12 +35,14 @@ message Operation { } message PythonEnvSpec { - string yaml = 2; // Conda yaml to install before execution - repeated LocalModule localModules = 3; - - message LocalModule { - string name = 1; // Name of module - string url = 2; // Url in storage to get module from + string python_version = 1; // 3.8, 3.9, ..., without patch + /* optional */ string pypi_index_url = 2; // Url of pypi index. If not set, using https://pypi.org/simple + repeated PythonPackage requirements = 3; // Requirements to install + repeated string local_modules_urls = 4; // Urls in storage to get local modules from + + message PythonPackage { + string name = 1; + string version = 2; } } diff --git a/lzy/lzy-service/src/main/java/ai/lzy/service/config/ClientVersions.java b/lzy/lzy-service/src/main/java/ai/lzy/service/config/ClientVersions.java index fcfaabffaa..00044548b3 100644 --- a/lzy/lzy-service/src/main/java/ai/lzy/service/config/ClientVersions.java +++ b/lzy/lzy-service/src/main/java/ai/lzy/service/config/ClientVersions.java @@ -13,7 +13,7 @@ public class ClientVersions { private static final Logger LOG = LogManager.getLogger(ClientVersions.class); private static final Map versions = Map.of( "pylzy", new ClientVersionsDescription( - /* minimal version */ new SemanticVersion(1, 14, 0), + /* minimal version */ new SemanticVersion(1, 15, 0), Set.of() ) ); diff --git a/model/src/main/proto/ai/lzy/v1/common/env.proto b/model/src/main/proto/ai/lzy/v1/common/env.proto index 9bc79e5640..daea351e2b 100644 --- a/model/src/main/proto/ai/lzy/v1/common/env.proto +++ b/model/src/main/proto/ai/lzy/v1/common/env.proto @@ -20,9 +20,15 @@ message EnvSpec { } message PythonEnv { - string name = 1; - string yaml = 2; - repeated LocalModule local_modules = 3; + string python_version = 1; // 3.8, 3.9, ..., without patch + /* optional */ string pypi_index_url = 2; // Url of pypi index. If not set, using https://pypi.org/simple + repeated PythonPackage requirements = 3; // Requirements to install + repeated string local_modules_urls = 4; // Urls in storage to get local modules from + + message PythonPackage { + string name = 1; + string version = 2; + } } message ProcessEnv {}