vertex testing use pathrise-convert-1606954137718

This commit is contained in:
Ishaan Jaff 2025-01-05 14:00:17 -08:00
parent c0e4485fe0
commit 137879ffea
19 changed files with 32 additions and 31 deletions

View file

@ -1,13 +1,13 @@
{
"type": "service_account",
"project_id": "adroit-crow-413218",
"project_id": "pathrise-convert-1606954137718",
"private_key_id": "",
"private_key": "",
"client_email": "test-adroit-crow@adroit-crow-413218.iam.gserviceaccount.com",
"client_email": "test-adroit-crow@pathrise-convert-1606954137718.iam.gserviceaccount.com",
"client_id": "104886546564708740969",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-adroit-crow%40adroit-crow-413218.iam.gserviceaccount.com",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-adroit-crow%40pathrise-convert-1606954137718.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}

View file

@ -491,7 +491,7 @@ async def test_create_vertex_fine_tune_jobs():
model="gemini-1.0-pro-002",
custom_llm_provider="vertex_ai",
training_file="gs://cloud-samples-data/ai-platform/generative_ai/sft_train_data.jsonl",
vertex_project="adroit-crow-413218",
vertex_project="pathrise-convert-1606954137718",
vertex_location="us-central1",
vertex_credentials=vertex_credentials,
)

View file

@ -34,7 +34,7 @@ def load_vertex_ai_credentials():
print("loading vertex ai credentials")
os.environ["GCS_FLUSH_INTERVAL"] = "1"
filepath = os.path.dirname(os.path.abspath(__file__))
vertex_key_path = filepath + "/adroit-crow-413218-bc47f303efc9.json"
vertex_key_path = filepath + "/pathrise-convert-1606954137718-bc47f303efc9.json"
# Read the existing content of the file or create an empty dictionary
try:

View file

@ -112,7 +112,7 @@ class TestVertexImageGeneration(BaseImageGenTest):
litellm.in_memory_llm_clients_cache = InMemoryCache()
return {
"model": "vertex_ai/imagegeneration@006",
"vertex_ai_project": "adroit-crow-413218",
"vertex_ai_project": "pathrise-convert-1606954137718",
"vertex_ai_location": "us-central1",
"n": 1,
}

View file

@ -59,7 +59,7 @@ def load_vertex_ai_credentials():
async def create_async_vertex_embedding_task():
load_vertex_ai_credentials()
base_url = "https://exampleopenaiendpoint-production.up.railway.app/v1/projects/adroit-crow-413218/locations/us-central1/publishers/google/models/embedding-gecko-001:predict"
base_url = "https://exampleopenaiendpoint-production.up.railway.app/v1/projects/pathrise-convert-1606954137718/locations/us-central1/publishers/google/models/embedding-gecko-001:predict"
embedding_args = {
"model": "vertex_ai/textembedding-gecko",
"input": "This is a test sentence for embedding.",

View file

@ -118,7 +118,7 @@ async def make_async_calls(message_type="text"):
def create_async_task(message_type):
base_url = "https://exampleopenaiendpoint-production.up.railway.app/v1/projects/adroit-crow-413218/locations/us-central1/publishers/google/models/gemini-1.0-pro-vision-001"
base_url = "https://exampleopenaiendpoint-production.up.railway.app/v1/projects/pathrise-convert-1606954137718/locations/us-central1/publishers/google/models/gemini-1.0-pro-vision-001"
if message_type == "text":
messages = [{"role": "user", "content": "hi"}]

View file

@ -1,13 +1,13 @@
{
"type": "service_account",
"project_id": "adroit-crow-413218",
"project_id": "pathrise-convert-1606954137718",
"private_key_id": "",
"private_key": "",
"client_email": "test-adroit-crow@adroit-crow-413218.iam.gserviceaccount.com",
"client_email": "test-adroit-crow@pathrise-convert-1606954137718.iam.gserviceaccount.com",
"client_id": "104886546564708740969",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-adroit-crow%40adroit-crow-413218.iam.gserviceaccount.com",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-adroit-crow%40pathrise-convert-1606954137718.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}

View file

@ -30,7 +30,7 @@ def load_vertex_ai_credentials():
print("loading vertex ai credentials")
os.environ["GCS_FLUSH_INTERVAL"] = "1"
filepath = os.path.dirname(os.path.abspath(__file__))
vertex_key_path = filepath + "/adroit-crow-413218-bc47f303efc9.json"
vertex_key_path = filepath + "/pathrise-convert-1606954137718-bc47f303efc9.json"
# Read the existing content of the file or create an empty dictionary
try:

View file

@ -1113,7 +1113,7 @@ def test_vertex_ai_stream(provider):
load_vertex_ai_credentials()
litellm.set_verbose = True
litellm.vertex_project = "adroit-crow-413218"
litellm.vertex_project = "pathrise-convert-1606954137718"
import random
test_models = ["gemini-1.5-pro"]

View file

@ -8,7 +8,7 @@
# LITE_LLM_ENDPOINT = "http://localhost:4000"
# vertexai.init(
# project="adroit-crow-413218",
# project="pathrise-convert-1606954137718",
# location="us-central1",
# api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex-ai",
# api_transport="rest",

View file

@ -37,7 +37,7 @@ class CredentialsWrapper(Credentials):
credentials = CredentialsWrapper(token=LITELLM_PROXY_API_KEY)
vertexai.init(
project="adroit-crow-413218",
project="pathrise-convert-1606954137718",
location="us-central1",
api_endpoint=LITELLM_PROXY_BASE,
credentials=credentials,

View file

@ -3,7 +3,7 @@ const { VertexAI, RequestOptions } = require('@google-cloud/vertexai');
const vertexAI = new VertexAI({
project: 'adroit-crow-413218',
project: 'pathrise-convert-1606954137718',
location: 'us-central1',
apiEndpoint: "127.0.0.1:4000/vertex-ai"
});

View file

@ -61,7 +61,7 @@ beforeAll(() => {
describe('Vertex AI Tests', () => {
test('should successfully generate content from Vertex AI', async () => {
const vertexAI = new VertexAI({
project: 'adroit-crow-413218',
project: 'pathrise-convert-1606954137718',
location: 'us-central1',
apiEndpoint: "localhost:4000/vertex-ai"
});
@ -100,7 +100,7 @@ describe('Vertex AI Tests', () => {
test('should successfully generate non-streaming content from Vertex AI', async () => {
const vertexAI = new VertexAI({project: 'adroit-crow-413218', location: 'us-central1', apiEndpoint: "localhost:4000/vertex-ai"});
const vertexAI = new VertexAI({project: 'pathrise-convert-1606954137718', location: 'us-central1', apiEndpoint: "localhost:4000/vertex-ai"});
const customHeaders = new Headers({"x-litellm-api-key": "sk-1234"});
const requestOptions = {customHeaders: customHeaders};
const generativeModel = vertexAI.getGenerativeModel({model: 'gemini-1.0-pro'}, requestOptions);

View file

@ -97,7 +97,7 @@ async def test_basic_vertex_ai_pass_through_with_spendlog():
load_vertex_ai_credentials()
vertexai.init(
project="adroit-crow-413218",
project="pathrise-convert-1606954137718",
location="us-central1",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai",
api_transport="rest",
@ -129,7 +129,7 @@ async def test_basic_vertex_ai_pass_through_streaming_with_spendlog():
load_vertex_ai_credentials()
vertexai.init(
project="adroit-crow-413218",
project="pathrise-convert-1606954137718",
location="us-central1",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai",
api_transport="rest",
@ -168,7 +168,7 @@ async def test_vertex_ai_pass_through_endpoint_context_caching():
# load_vertex_ai_credentials()
vertexai.init(
project="adroit-crow-413218",
project="pathrise-convert-1606954137718",
location="us-central1",
api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai",
api_transport="rest",

View file

@ -69,7 +69,7 @@ beforeAll(() => {
describe('Vertex AI Tests', () => {
test('should successfully generate non-streaming content with tags', async () => {
const vertexAI = new VertexAI({
project: 'adroit-crow-413218',
project: 'pathrise-convert-1606954137718',
location: 'us-central1',
apiEndpoint: "127.0.0.1:4000/vertex_ai"
});
@ -125,7 +125,7 @@ describe('Vertex AI Tests', () => {
test('should successfully generate streaming content with tags', async () => {
const vertexAI = new VertexAI({
project: 'adroit-crow-413218',
project: 'pathrise-convert-1606954137718',
location: 'us-central1',
apiEndpoint: "127.0.0.1:4000/vertex_ai"
});

View file

@ -34,7 +34,7 @@ async def aiter_mock(iterable):
[
(
EndpointType.VERTEX_AI,
"v1/projects/adroit-crow-413218/locations/us-central1/publishers/google/models/gemini-1.0-pro:generateContent",
"v1/projects/pathrise-convert-1606954137718/locations/us-central1/publishers/google/models/gemini-1.0-pro:generateContent",
),
(EndpointType.ANTHROPIC, "/v1/messages"),
],

View file

@ -1,13 +1,13 @@
{
"type": "service_account",
"project_id": "adroit-crow-413218",
"project_id": "pathrise-convert-1606954137718",
"private_key_id": "",
"private_key": "",
"client_email": "test-adroit-crow@adroit-crow-413218.iam.gserviceaccount.com",
"client_email": "test-adroit-crow@pathrise-convert-1606954137718.iam.gserviceaccount.com",
"client_id": "104886546564708740969",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-adroit-crow%40adroit-crow-413218.iam.gserviceaccount.com",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-adroit-crow%40pathrise-convert-1606954137718.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}

View file

@ -1604,7 +1604,7 @@ async def test_add_callback_via_key_litellm_pre_call_utils_gcs_bucket(
"callback_type": callback_type,
"callback_vars": {
"gcs_bucket_name": "key-logging-project1",
"gcs_path_service_account": "adroit-crow-413218-a956eef1a2a8.json",
"gcs_path_service_account": "pathrise-convert-1606954137718-a956eef1a2a8.json",
},
}
]
@ -1653,7 +1653,8 @@ async def test_add_callback_via_key_litellm_pre_call_utils_gcs_bucket(
assert new_data["gcs_bucket_name"] == "key-logging-project1"
assert "gcs_path_service_account" in new_data
assert (
new_data["gcs_path_service_account"] == "adroit-crow-413218-a956eef1a2a8.json"
new_data["gcs_path_service_account"]
== "pathrise-convert-1606954137718-a956eef1a2a8.json"
)
if expected_success_callbacks:

View file

@ -244,7 +244,7 @@ def test_google_secret_manager():
"""
Test that we can get a secret from Google Secret Manager
"""
os.environ["GOOGLE_SECRET_MANAGER_PROJECT_ID"] = "adroit-crow-413218"
os.environ["GOOGLE_SECRET_MANAGER_PROJECT_ID"] = "pathrise-convert-1606954137718"
from litellm.secret_managers.google_secret_manager import GoogleSecretManager
@ -270,7 +270,7 @@ def test_google_secret_manager_read_in_memory():
from litellm.secret_managers.google_secret_manager import GoogleSecretManager
load_vertex_ai_credentials()
os.environ["GOOGLE_SECRET_MANAGER_PROJECT_ID"] = "adroit-crow-413218"
os.environ["GOOGLE_SECRET_MANAGER_PROJECT_ID"] = "pathrise-convert-1606954137718"
secret_manager = GoogleSecretManager()
secret_manager.cache.cache_dict["UNIQUE_KEY"] = None
secret_manager.cache.cache_dict["UNIQUE_KEY_2"] = "lite-llm"