mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-18 09:45:23 +00:00
revert: restore original workflows and shared test configuration
This commit is contained in:
parent
a543acdf0e
commit
92d30bf16b
5 changed files with 4 additions and 22 deletions
2
.github/workflows/codspeed.yml
vendored
2
.github/workflows/codspeed.yml
vendored
|
|
@ -43,8 +43,6 @@ jobs:
|
|||
benchmarks:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
LITELLM_LOCAL_MODEL_COST_MAP: "True"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
|
|
|
|||
8
.github/workflows/test-unit.yml
vendored
8
.github/workflows/test-unit.yml
vendored
|
|
@ -101,14 +101,6 @@ jobs:
|
|||
timeout-minutes: 20
|
||||
job-timeout-minutes: 60
|
||||
|
||||
- shard: Web IQ
|
||||
artifact-name: llm-webiq
|
||||
test-path: "tests/unit/llms/webiq tests/unit/test_socket_policy.py"
|
||||
workers: 2
|
||||
reruns: 0
|
||||
timeout-minutes: 5
|
||||
job-timeout-minutes: 45
|
||||
|
||||
- shard: misc
|
||||
artifact-name: misc
|
||||
test-path: >-
|
||||
|
|
|
|||
|
|
@ -13,11 +13,10 @@ import sys
|
|||
from collections.abc import Callable, Iterator
|
||||
from concurrent.futures import Future
|
||||
from pathlib import Path
|
||||
from typing import Final, ParamSpec, TypeVar
|
||||
from typing import ParamSpec, TypeVar
|
||||
|
||||
import pytest
|
||||
|
||||
from litellm.litellm_core_utils.get_model_cost_map import get_model_cost_map_source_info
|
||||
from litellm.litellm_core_utils.thread_pool_executor import executor
|
||||
|
||||
P = ParamSpec("P")
|
||||
|
|
@ -25,10 +24,6 @@ R = TypeVar("R")
|
|||
|
||||
|
||||
def pytest_configure(config: pytest.Config) -> None:
|
||||
catalog: Final = get_model_cost_map_source_info()
|
||||
if catalog["source"] != "local" or not catalog["is_env_forced"]:
|
||||
raise pytest.UsageError("Set LITELLM_LOCAL_MODEL_COST_MAP=True before importing litellm for benchmarks")
|
||||
print(f"Benchmark catalog: {catalog['source_revision']} (bundled)") # noqa: T201 # record benchmark input provenance
|
||||
if os.environ.get("LITELLM_REQUIRE_INSTALLED_WHEEL") != "1":
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import litellm # noqa: E402 # litellm reads LITELLM_LOCAL_MODEL_COST_MAP at im
|
|||
import litellm.router as litellm_router_module # noqa: E402 # same import-time dependency
|
||||
import litellm.utils as litellm_utils_module # noqa: E402 # same import-time dependency
|
||||
|
||||
LOOPBACK_HOSTS: Final = ["127.0.0.1", "::1", "localhost"]
|
||||
LOOPBACK_HOSTS: Final = ["127.0.0.1", "::1"]
|
||||
AMBIENT_AZURE_CREDENTIAL_ENV_VARS: Final = (
|
||||
"AZURE_AD_TOKEN",
|
||||
"AZURE_TENANT_ID",
|
||||
|
|
|
|||
|
|
@ -9,12 +9,9 @@ def test_external_connect_is_refused_before_a_packet_leaves() -> None:
|
|||
socket.create_connection(("192.0.2.1", 9), timeout=1)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("host", ["127.0.0.1", "localhost"])
|
||||
def test_loopback_connect_is_allowed(host: str) -> None:
|
||||
def test_loopback_connect_is_allowed() -> None:
|
||||
with socket.socket() as server:
|
||||
server.bind(("127.0.0.1", 0))
|
||||
server.listen()
|
||||
with socket.socket() as client:
|
||||
client.settimeout(1)
|
||||
client.connect((host, server.getsockname()[1]))
|
||||
with socket.create_connection(server.getsockname(), timeout=1) as client:
|
||||
assert client.getpeername() == server.getsockname()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue