Skip to content

Commit 26d6aa4

Browse files
authored
chore(generative_ai): unmark test as fixture (#13397)
1 parent 6882e38 commit 26d6aa4

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

generative_ai/embeddings/batch_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
from google.cloud.aiplatform import BatchPredictionJob
1717

1818
PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")
19-
OUTPUT_URI = os.getenv("GCS_OUTPUT_URI")
2019

2120

22-
def embed_text_batch() -> BatchPredictionJob:
21+
def embed_text_batch(OUTPUT_URI: str) -> BatchPredictionJob:
2322
"""Example of how to generate embeddings from text using batch processing.
2423
2524
Read more: https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/batch-prediction-genai-embeddings

generative_ai/embeddings/test_embeddings_examples.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from google.cloud import aiplatform
2323
from google.cloud.aiplatform import initializer as aiplatform_init
2424

25-
import pytest
2625

2726
import batch_example
2827
import code_retrieval_example
@@ -35,10 +34,8 @@
3534

3635

3736
@backoff.on_exception(backoff.expo, ResourceExhausted, max_time=10)
38-
@pytest.fixture(scope="session")
3937
def test_embed_text_batch() -> None:
40-
os.environ["GCS_OUTPUT_URI"] = "gs://python-docs-samples-tests/"
41-
batch_prediction_job = batch_example.embed_text_batch()
38+
batch_prediction_job = batch_example.embed_text_batch("gs://python-docs-samples-tests/")
4239
assert batch_prediction_job
4340

4441

0 commit comments

Comments
 (0)