Skip to content

Commit 98d8ab5

Browse files
feat(generative-ai): code clean up & add requirement files to feature folders (#12709)
Multiple changes * Move text-bison, code-bison samples to text_models folder * Add requirement files to feature folders * code cleanup and fix lint issues
1 parent ccd7ee2 commit 98d8ab5

File tree

101 files changed

+644
-137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+644
-137
lines changed

generative_ai/audio/__init__.py

Whitespace-only changes.

generative_ai/batch_predict/test_batch_predict.py renamed to generative_ai/batch_predict/test_batch_predict_examples.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,17 @@
1313
# limitations under the License.
1414
from typing import Callable
1515

16-
17-
import batch_code_predict
18-
import batch_text_predict
19-
import gemini_batch_predict
20-
21-
2216
from google.cloud import storage
2317
from google.cloud.aiplatform import BatchPredictionJob
2418
from google.cloud.aiplatform_v1 import JobState
2519

2620
import pytest
2721

22+
import batch_code_predict
23+
import batch_text_predict
24+
import gemini_batch_predict
25+
26+
2827
INPUT_BUCKET = "cloud-samples-data"
2928
OUTPUT_BUCKET = "python-docs-samples-tests"
3029
OUTPUT_PATH = "batch/batch_text_predict_output"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
backoff==2.2.1
2+
google-api-core==2.19.0
3+
pytest==8.2.0
4+
pytest-asyncio==0.23.6
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pandas==1.3.5; python_version == '3.7'
2+
pandas==2.0.3; python_version == '3.8'
3+
pandas==2.1.4; python_version > '3.8'
4+
pillow==10.3.0; python_version < '3.8'
5+
pillow==10.3.0; python_version >= '3.8'
6+
google-cloud-aiplatform[all]==1.69.0
7+
sentencepiece==0.2.0
8+
google-auth==2.29.0
9+
anthropic[vertex]==0.28.0
10+
langchain-core==0.2.11
11+
langchain-google-vertexai==1.0.6
12+
numpy<2
13+
openai==1.30.5
14+
immutabledict==4.2.0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
backoff==2.2.1
2+
google-api-core==2.19.0
3+
pytest==8.2.0
4+
pytest-asyncio==0.23.6
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pandas==1.3.5; python_version == '3.7'
2+
pandas==2.0.3; python_version == '3.8'
3+
pandas==2.1.4; python_version > '3.8'
4+
pillow==10.3.0; python_version < '3.8'
5+
pillow==10.3.0; python_version >= '3.8'
6+
google-cloud-aiplatform[all]==1.69.0
7+
sentencepiece==0.2.0
8+
google-auth==2.29.0
9+
anthropic[vertex]==0.28.0
10+
langchain-core==0.2.11
11+
langchain-google-vertexai==1.0.6
12+
numpy<2
13+
openai==1.30.5
14+
immutabledict==4.2.0

generative_ai/context_caching/test_context_caching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616
from typing import Generator
1717

18+
import pytest
1819

1920
import create_context_cache
2021
import delete_context_cache
2122
import get_context_cache
2223
import list_context_caches
23-
import pytest
2424
import update_context_cache
2525
import use_context_cache
2626

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
backoff==2.2.1
2+
google-api-core==2.19.0
3+
pytest==8.2.0
4+
pytest-asyncio==0.23.6

0 commit comments

Comments
 (0)