mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
test: skip watsonx tests - account closed
This commit is contained in:
parent
cf07d3abae
commit
4aa6a2350a
2 changed files with 33 additions and 16 deletions
|
@ -1,20 +1,25 @@
|
||||||
import sys, os, json
|
import json
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
import os, io
|
import io
|
||||||
|
import os
|
||||||
|
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.abspath("../..")
|
0, os.path.abspath("../..")
|
||||||
) # Adds the parent directory to the system path
|
) # Adds the parent directory to the system path
|
||||||
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import litellm
|
import litellm
|
||||||
from litellm import embedding, completion, completion_cost, Timeout
|
from litellm import RateLimitError, Timeout, completion, completion_cost, embedding
|
||||||
from litellm import RateLimitError
|
from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
|
||||||
from litellm.llms.prompt_templates.factory import anthropic_messages_pt
|
from litellm.llms.prompt_templates.factory import anthropic_messages_pt
|
||||||
from unittest.mock import patch, MagicMock
|
|
||||||
from litellm.llms.custom_httpx.http_handler import HTTPHandler, AsyncHTTPHandler
|
|
||||||
|
|
||||||
# litellm.num_retries =3
|
# litellm.num_retries =3
|
||||||
litellm.cache = None
|
litellm.cache = None
|
||||||
|
@ -1500,7 +1505,9 @@ def test_ollama_image():
|
||||||
data is untouched.
|
data is untouched.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import io, base64
|
import base64
|
||||||
|
import io
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
def mock_post(url, **kwargs):
|
def mock_post(url, **kwargs):
|
||||||
|
@ -3478,6 +3485,7 @@ def test_completion_palm_stream():
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="IBM closed account.")
|
||||||
def test_completion_watsonx():
|
def test_completion_watsonx():
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
model_name = "watsonx/ibm/granite-13b-chat-v2"
|
model_name = "watsonx/ibm/granite-13b-chat-v2"
|
||||||
|
@ -3498,6 +3506,7 @@ def test_completion_watsonx():
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="IBM closed account.")
|
||||||
def test_completion_stream_watsonx():
|
def test_completion_stream_watsonx():
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
model_name = "watsonx/ibm/granite-13b-chat-v2"
|
model_name = "watsonx/ibm/granite-13b-chat-v2"
|
||||||
|
@ -3565,6 +3574,7 @@ def test_unified_auth_params(provider, model, project, region_name, token):
|
||||||
assert value in translated_optional_params
|
assert value in translated_optional_params
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="IBM closed account.")
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_acompletion_watsonx():
|
async def test_acompletion_watsonx():
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
|
@ -3585,6 +3595,7 @@ async def test_acompletion_watsonx():
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="IBM closed account.")
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_acompletion_stream_watsonx():
|
async def test_acompletion_stream_watsonx():
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
#### What this tests ####
|
#### What this tests ####
|
||||||
# This tests streaming for the completion endpoint
|
# This tests streaming for the completion endpoint
|
||||||
|
|
||||||
import sys, os, asyncio
|
import asyncio
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
import time, pytest, uuid
|
import uuid
|
||||||
from pydantic import BaseModel
|
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.abspath("../..")
|
0, os.path.abspath("../..")
|
||||||
) # Adds the parent directory to the system path
|
) # Adds the parent directory to the system path
|
||||||
|
@ -15,12 +20,12 @@ from dotenv import load_dotenv
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
import litellm
|
import litellm
|
||||||
from litellm import (
|
from litellm import (
|
||||||
completion,
|
|
||||||
acompletion,
|
|
||||||
AuthenticationError,
|
AuthenticationError,
|
||||||
BadRequestError,
|
BadRequestError,
|
||||||
RateLimitError,
|
|
||||||
ModelResponse,
|
ModelResponse,
|
||||||
|
RateLimitError,
|
||||||
|
acompletion,
|
||||||
|
completion,
|
||||||
)
|
)
|
||||||
|
|
||||||
litellm.logging = False
|
litellm.logging = False
|
||||||
|
@ -1644,9 +1649,8 @@ def test_sagemaker_weird_response():
|
||||||
When the stream ends, flush any remaining holding chunks.
|
When the stream ends, flush any remaining holding chunks.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
from litellm.llms.sagemaker import TokenIterator
|
|
||||||
import json
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from litellm.llms.sagemaker import TokenIterator
|
from litellm.llms.sagemaker import TokenIterator
|
||||||
|
|
||||||
chunk = """<s>[INST] Hey, how's it going? [/INST],
|
chunk = """<s>[INST] Hey, how's it going? [/INST],
|
||||||
|
@ -1772,6 +1776,7 @@ def test_completion_sagemaker_stream():
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="IBM closed account.")
|
||||||
def test_completion_watsonx_stream():
|
def test_completion_watsonx_stream():
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
try:
|
try:
|
||||||
|
@ -2631,9 +2636,10 @@ def test_success_callback_streaming():
|
||||||
|
|
||||||
# test_success_callback_streaming()
|
# test_success_callback_streaming()
|
||||||
|
|
||||||
|
from typing import List, Optional
|
||||||
|
|
||||||
#### STREAMING + FUNCTION CALLING ###
|
#### STREAMING + FUNCTION CALLING ###
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from typing import List, Optional
|
|
||||||
|
|
||||||
|
|
||||||
class Function(BaseModel):
|
class Function(BaseModel):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue