From 00d6c1967cec887374e086b9418801483dda5e8f Mon Sep 17 00:00:00 2001 From: emrgnt-cmplxty <68796651+emrgnt-cmplxty@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:58:42 -0700 Subject: [PATCH] Feature/rm core dependency cli (#974) * add group permissions * fix typo * rm core dep * bump * fixed --- py/cli/commands/server.py | 1 - py/cli/utils/docker_utils.py | 31 ------------------------------- py/poetry.lock | 12 ++++++------ py/pyproject.toml | 3 ++- py/sdk/models.py | 2 +- 5 files changed, 9 insertions(+), 40 deletions(-) diff --git a/py/cli/commands/server.py b/py/cli/commands/server.py index ea7fbd84f..35c7a39c7 100644 --- a/py/cli/commands/server.py +++ b/py/cli/commands/server.py @@ -219,7 +219,6 @@ def serve( if docker: run_docker_serve( - client, host, port, exclude_neo4j, diff --git a/py/cli/utils/docker_utils.py b/py/cli/utils/docker_utils.py index 734b6679c..31faa87ca 100644 --- a/py/cli/utils/docker_utils.py +++ b/py/cli/utils/docker_utils.py @@ -11,7 +11,6 @@ import requests from requests.exceptions import RequestException -from core.main import R2RBuilder, R2RConfig from sdk import R2RClient @@ -102,7 +101,6 @@ def run_local_serve( def run_docker_serve( - client: R2RClient, host: str, port: int, exclude_neo4j: bool, @@ -119,35 +117,6 @@ def run_docker_serve( if config_path and config_name: raise ValueError("Cannot specify both config_path and config_name") - if config_path: - config = R2RConfig.from_toml(config_path) - else: - if not config_name: - config_name = "default" - config = R2RConfig.from_toml(R2RBuilder.CONFIG_OPTIONS[config_name]) - - if "unstructured" in config.parsing.provider and not image: - image = "emrgntcmplxty/r2r-unstructured" - - completion_provider = config.completion.provider - completion_model = config.completion.generation_config.model - completion_model_provider = completion_model.split("/")[0] - - check_llm_reqs( - completion_provider, - completion_model_provider, - include_ollama=exclude_ollama, - ) - - embedding_provider = config.embedding.provider - embedding_model = config.embedding.base_model - embedding_model_provider = embedding_model.split("/")[0] - check_llm_reqs( - embedding_provider, - embedding_model_provider, - include_ollama=exclude_ollama, - ) - no_conflict, message = check_subnet_conflict() if not no_conflict: click.secho(f"Warning: {message}", fg="red", bold=True) diff --git a/py/poetry.lock b/py/poetry.lock index d45ad242b..63abb7183 100644 --- a/py/poetry.lock +++ b/py/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "aiohappyeyeballs" @@ -2630,11 +2630,11 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.21.0", markers = "python_version == \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\""}, + {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""}, {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, {version = ">=1.19.3", markers = "platform_system == \"Linux\" and platform_machine == \"aarch64\" and python_version >= \"3.8\" and python_version < \"3.10\" or python_version > \"3.9\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_system != \"Darwin\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_machine != \"arm64\" and python_version < \"3.10\""}, - {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, ] [[package]] @@ -2717,8 +2717,8 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.22.4", markers = "python_version < \"3.11\""}, - {version = ">=1.23.2", markers = "python_version == \"3.11\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.23.2", markers = "python_version == \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -3517,7 +3517,7 @@ typing-extensions = ">=4.9.0" name = "python-dotenv" version = "1.0.1" description = "Read key-value pairs from a .env file and set them as environment variables" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"}, @@ -4806,4 +4806,4 @@ core-ingest-movies = ["moviepy", "opencv-python"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.13" -content-hash = "e895ee32f5d5aa71a29548d0e48044276b364a43c54b62f7f6da0bb932b53499" +content-hash = "ae7a753f12563a8e386c45390176e888ab5aabdd6abcf77cdf1597b7c1ae4cf2" diff --git a/py/pyproject.toml b/py/pyproject.toml index c7a2a3c39..ba0870ac6 100644 --- a/py/pyproject.toml +++ b/py/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "r2r" readme = "README.md" -version = "0.3.0" +version = "0.3.01" description = "SciPhi R2R" authors = ["Owen Colegrove "] license = "MIT" @@ -63,6 +63,7 @@ psutil = { version = "^6.0.0", optional = true } deepdiff = { version = "^7.0.1", optional = true } graspologic = { version = "^3.4.1", optional = true } nltk = "^3.9.1" +python-dotenv = "^1.0.1" [tool.poetry.extras] core = [ diff --git a/py/sdk/models.py b/py/sdk/models.py index a832c36c3..1d2710396 100644 --- a/py/sdk/models.py +++ b/py/sdk/models.py @@ -550,4 +550,4 @@ class Config: "kg_search_results": None, }, } - } + } \ No newline at end of file