From 501fe752f9124308cb326215a24f3cc5a0ebdb44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:21:48 -0400 Subject: [PATCH] chore(deps): bump openai from 1.38.0 to 1.41.0 (#1065) * chore(deps): bump openai from 1.38.0 to 1.41.0 Bumps [openai](https://github.com/openai/openai-python) from 1.38.0 to 1.41.0. - [Release notes](https://github.com/openai/openai-python/releases) - [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/openai/openai-python/compare/v1.38.0...v1.41.0) --- updated-dependencies: - dependency-name: openai dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * ci: auto fixes from pre-commit.ci For more information, see https://pre-commit.ci --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- src/openllm/__main__.py | 6 ++---- src/openllm/clean.py | 3 +-- src/openllm/cloud.py | 3 +-- src/openllm/model.py | 22 +++++++++------------- 5 files changed, 14 insertions(+), 22 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0419743d..24e3c608 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ "dulwich", "tabulate", "uv", - "openai==1.38.0", + "openai==1.41.0", ] keywords = [ "MLOps", diff --git a/src/openllm/__main__.py b/src/openllm/__main__.py index 870ef6f9..5d9a8d67 100644 --- a/src/openllm/__main__.py +++ b/src/openllm/__main__.py @@ -9,14 +9,12 @@ from typing import Annotated, Optional import questionary import typer -from openllm.accelerator_spec import (DeploymentTarget, can_run, - get_local_machine_spec) +from openllm.accelerator_spec import DeploymentTarget, can_run, get_local_machine_spec from openllm.analytic import DO_NOT_TRACK, OpenLLMTyper from openllm.clean import app as clean_app from openllm.cloud import deploy as cloud_deploy from openllm.cloud import ensure_cloud_context, get_cloud_machine_spec -from openllm.common import (CHECKED, INTERACTIVE, VERBOSE_LEVEL, BentoInfo, - output) +from openllm.common import CHECKED, INTERACTIVE, VERBOSE_LEVEL, BentoInfo, output from openllm.local import run as local_run from openllm.local import serve as local_serve from openllm.model import app as model_app diff --git a/src/openllm/clean.py b/src/openllm/clean.py index 19c302ed..a5aa11ea 100644 --- a/src/openllm/clean.py +++ b/src/openllm/clean.py @@ -5,8 +5,7 @@ import shutil import questionary from openllm.analytic import OpenLLMTyper -from openllm.common import (CONFIG_FILE, REPO_DIR, VENV_DIR, VERBOSE_LEVEL, - output) +from openllm.common import CONFIG_FILE, REPO_DIR, VENV_DIR, VERBOSE_LEVEL, output app = OpenLLMTyper(help='clean up and release disk space used by OpenLLM') diff --git a/src/openllm/cloud.py b/src/openllm/cloud.py index 56890a60..cd6d8bac 100644 --- a/src/openllm/cloud.py +++ b/src/openllm/cloud.py @@ -9,8 +9,7 @@ import typer from openllm.accelerator_spec import ACCELERATOR_SPECS from openllm.analytic import OpenLLMTyper -from openllm.common import (INTERACTIVE, BentoInfo, DeploymentTarget, output, - run_command) +from openllm.common import INTERACTIVE, BentoInfo, DeploymentTarget, output, run_command app = OpenLLMTyper() diff --git a/src/openllm/model.py b/src/openllm/model.py index f46bd322..8e78edbe 100644 --- a/src/openllm/model.py +++ b/src/openllm/model.py @@ -54,11 +54,7 @@ def list_model(tag: Optional[str] = None, repo: Optional[str] = None, verbose: b output(table) -def ensure_bento( - model: str, - target: Optional[DeploymentTarget] = None, - repo_name: Optional[str] = None, -) -> BentoInfo: +def ensure_bento(model: str, target: Optional[DeploymentTarget] = None, repo_name: Optional[str] = None) -> BentoInfo: bentos = list_bento(model, repo_name=repo_name) if len(bentos) == 0: output(f'No model found for {model}', style='red') @@ -67,9 +63,11 @@ def ensure_bento( if len(bentos) == 1: output(f'Found model {bentos[0]}', style='green') if target is not None and can_run(bentos[0], target) <= 0: - output(f'The machine({target.name}) with {target.accelerators_repr} does not appear to have sufficient ' - f'resources to run model {bentos[0]}\n', - style='yellow') + output( + f'The machine({target.name}) with {target.accelerators_repr} does not appear to have sufficient ' + f'resources to run model {bentos[0]}\n', + style='yellow', + ) return bentos[0] # multiple models, pick one according to target @@ -90,14 +88,12 @@ def _extract_first_number(s: str): def list_bento( - tag: typing.Optional[str] = None, - repo_name: typing.Optional[str] = None, - include_alias: bool = False, + tag: typing.Optional[str] = None, repo_name: typing.Optional[str] = None, include_alias: bool = False ) -> typing.List[BentoInfo]: ensure_repo_updated() - if repo_name is None and tag and "/" in tag: - repo_name, tag = tag.split("/", 1) + if repo_name is None and tag and '/' in tag: + repo_name, tag = tag.split('/', 1) if repo_name is not None: config = load_config()