Skip to content

Commit 8b20710

Browse files
speedstorm1copybara-github
authored andcommitted
feat: Add support for Tunings.tune() and Tunings.get() in Dotnet SDK
PiperOrigin-RevId: 821873672
1 parent 141881b commit 8b20710

Some content is hidden

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

43 files changed

+6164
-0
lines changed

Google.GenAI.E2E.Tests/Recordings/TuneTest.TuneContinuousJobsVertexTest.json

Lines changed: 1267 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"recordID": "TuneTest.TunePretunedModelVertexTest",
3+
"interactions": [
4+
{
5+
"request": {
6+
"method": "POST",
7+
"url": "/v1beta1/projects/REDACTED/locations/us-central1/tuningJobs",
8+
"request": "POST /v1beta1/projects/REDACTED/locations/us-central1/tuningJobs HTTP/1.1",
9+
"headers": {
10+
"Content-Length": "244",
11+
"Content-Type": "application/json; charset=utf-8",
12+
"Test-Name": "TuneTest.TunePretunedModelVertexTest"
13+
},
14+
"bodySegments": [
15+
{
16+
"preTunedModel": {
17+
"tunedModelName": "projects/801452371447/locations/us-central1/models/9030969596621881344"
18+
},
19+
"supervisedTuningSpec": {
20+
"trainingDatasetUri": "gs://cloud-samples-data/ai-platform/generative_ai/gemini-2_0/text/sft_train_data.jsonl"
21+
}
22+
}
23+
],
24+
"previousRequest": "b4d6e60a9b97e7b98c63df9308728c5c88c0b40c398046772c63447b94608b4d",
25+
"serverAddress": "us-central1-aiplatform.googleapis.com",
26+
"port": 443,
27+
"protocol": "https"
28+
},
29+
"shaSum": "01fb241c6447ec009e74653e0bbca3857703d7f6e47e5ebfb72555d4d565d093",
30+
"response": {
31+
"statusCode": 200,
32+
"headers": {
33+
"Content-Type": "application/json; charset=UTF-8",
34+
"Date": "Wed, 22 Oct 2025 17:25:46 GMT",
35+
"Server": "ESF",
36+
"Vary": "Origin, X-Origin, Referer",
37+
"X-Content-Type-Options": "nosniff",
38+
"X-Frame-Options": "SAMEORIGIN",
39+
"X-Xss-Protection": "0"
40+
},
41+
"bodySegments": [
42+
{
43+
"createTime": "2025-10-22T17:25:46.067869Z",
44+
"name": "projects/801452371447/locations/us-central1/tuningJobs/4130490750305566720",
45+
"preTunedModel": {
46+
"baseModel": "gemini-2.5-flash",
47+
"checkpointId": "4",
48+
"tunedModelName": "projects/801452371447/locations/us-central1/models/9030969596621881344@1"
49+
},
50+
"state": "JOB_STATE_PENDING",
51+
"supervisedTuningSpec": {
52+
"hyperParameters": {
53+
"adapterSize": "ADAPTER_SIZE_FOUR"
54+
},
55+
"trainingDatasetUri": "gs://cloud-samples-data/ai-platform/generative_ai/gemini-2_0/text/sft_train_data.jsonl"
56+
},
57+
"tunedModelDisplayName": "8/5 2.5 flash tuned model",
58+
"updateTime": "2025-10-22T17:25:46.067869Z"
59+
}
60+
]
61+
}
62+
}
63+
]
64+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"recordID": "TuneTest.TunePretunedModelWithCheckpointIdVertexTest",
3+
"interactions": [
4+
{
5+
"request": {
6+
"method": "POST",
7+
"url": "/v1beta1/projects/REDACTED/locations/us-central1/tuningJobs",
8+
"request": "POST /v1beta1/projects/REDACTED/locations/us-central1/tuningJobs HTTP/1.1",
9+
"headers": {
10+
"Content-Length": "263",
11+
"Content-Type": "application/json; charset=utf-8",
12+
"Test-Name": "TuneTest.TunePretunedModelWithCheckpointIdVertexTest"
13+
},
14+
"bodySegments": [
15+
{
16+
"preTunedModel": {
17+
"checkpointId": "3",
18+
"tunedModelName": "projects/801452371447/locations/us-central1/models/9030969596621881344"
19+
},
20+
"supervisedTuningSpec": {
21+
"trainingDatasetUri": "gs://cloud-samples-data/ai-platform/generative_ai/gemini-2_0/text/sft_train_data.jsonl"
22+
}
23+
}
24+
],
25+
"previousRequest": "b4d6e60a9b97e7b98c63df9308728c5c88c0b40c398046772c63447b94608b4d",
26+
"serverAddress": "us-central1-aiplatform.googleapis.com",
27+
"port": 443,
28+
"protocol": "https"
29+
},
30+
"shaSum": "a17e915a326fc31f88af7c1f3edf0f61d840dbd14883b4d940ec8ce97813fd43",
31+
"response": {
32+
"statusCode": 200,
33+
"headers": {
34+
"Content-Type": "application/json; charset=UTF-8",
35+
"Date": "Wed, 22 Oct 2025 17:26:09 GMT",
36+
"Server": "ESF",
37+
"Vary": "Origin, X-Origin, Referer",
38+
"X-Content-Type-Options": "nosniff",
39+
"X-Frame-Options": "SAMEORIGIN",
40+
"X-Xss-Protection": "0"
41+
},
42+
"bodySegments": [
43+
{
44+
"createTime": "2025-10-22T17:26:09.018627Z",
45+
"name": "projects/801452371447/locations/us-central1/tuningJobs/1906275484337963008",
46+
"preTunedModel": {
47+
"baseModel": "gemini-2.5-flash",
48+
"checkpointId": "3",
49+
"tunedModelName": "projects/801452371447/locations/us-central1/models/9030969596621881344@1"
50+
},
51+
"state": "JOB_STATE_PENDING",
52+
"supervisedTuningSpec": {
53+
"hyperParameters": {
54+
"adapterSize": "ADAPTER_SIZE_FOUR"
55+
},
56+
"trainingDatasetUri": "gs://cloud-samples-data/ai-platform/generative_ai/gemini-2_0/text/sft_train_data.jsonl"
57+
},
58+
"tunedModelDisplayName": "8/5 2.5 flash tuned model",
59+
"updateTime": "2025-10-22T17:26:09.018627Z"
60+
}
61+
]
62+
}
63+
}
64+
]
65+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"recordID": "TuneTest.TuneSimpleVertexTest",
3+
"interactions": [
4+
{
5+
"request": {
6+
"method": "POST",
7+
"url": "/v1beta1/projects/REDACTED/locations/us-central1/tuningJobs",
8+
"request": "POST /v1beta1/projects/REDACTED/locations/us-central1/tuningJobs HTTP/1.1",
9+
"headers": {
10+
"Content-Length": "202",
11+
"Content-Type": "application/json; charset=utf-8",
12+
"Test-Name": "TuneTest.TuneSimpleVertexTest"
13+
},
14+
"bodySegments": [
15+
{
16+
"baseModel": "gemini-2.5-flash",
17+
"supervisedTuningSpec": {
18+
"hyperParameters": {
19+
"epochCount": 1
20+
},
21+
"trainingDatasetUri": "gs://cloud-samples-data/ai-platform/generative_ai/gemini-1_5/text/sft_train_data.jsonl"
22+
}
23+
}
24+
],
25+
"previousRequest": "b4d6e60a9b97e7b98c63df9308728c5c88c0b40c398046772c63447b94608b4d",
26+
"serverAddress": "us-central1-aiplatform.googleapis.com",
27+
"port": 443,
28+
"protocol": "https"
29+
},
30+
"shaSum": "57ef9e2e4aa06e088fd0f98d0d03e37f42947e397674a600c72a2f8f601e68ab",
31+
"response": {
32+
"statusCode": 200,
33+
"headers": {
34+
"Content-Type": "application/json; charset=UTF-8",
35+
"Date": "Tue, 21 Oct 2025 03:43:36 GMT",
36+
"Server": "ESF",
37+
"Vary": "Origin, X-Origin, Referer",
38+
"X-Content-Type-Options": "nosniff",
39+
"X-Frame-Options": "SAMEORIGIN",
40+
"X-Xss-Protection": "0"
41+
},
42+
"bodySegments": [
43+
{
44+
"baseModel": "gemini-2.5-flash",
45+
"createTime": "2025-10-21T03:43:36.052253Z",
46+
"name": "projects/801452371447/locations/us-central1/tuningJobs/8697521203482460160",
47+
"state": "JOB_STATE_PENDING",
48+
"supervisedTuningSpec": {
49+
"hyperParameters": {
50+
"epochCount": "1"
51+
},
52+
"trainingDatasetUri": "gs://cloud-samples-data/ai-platform/generative_ai/gemini-1_5/text/sft_train_data.jsonl"
53+
},
54+
"tunedModelDisplayName": "gemini-2.5-flash-31a3762d-46fb-4962-a37f-87f35befbe37",
55+
"updateTime": "2025-10-21T03:43:36.052253Z"
56+
}
57+
]
58+
}
59+
}
60+
]
61+
}

0 commit comments

Comments
 (0)