Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add partner_model_tuning_spec to TuningJob #5721

Merged
merged 14 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,12 @@ message GroundingMetadata {
// Optional. List of grounding support.
repeated GroundingSupport grounding_supports = 6
[(google.api.field_behavior) = OPTIONAL];

// Optional. Output only. Retrieval metadata.
optional RetrievalMetadata retrieval_metadata = 7 [
(google.api.field_behavior) = OPTIONAL,
(google.api.field_behavior) = OUTPUT_ONLY
];
}

// Google search entry point.
Expand All @@ -572,3 +578,14 @@ message SearchEntryPoint {
// url> tuple.
bytes sdk_blob = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Metadata related to retrieval in the grounding flow.
message RetrievalMetadata {
// Optional. Score indicating how likely information from google search could
// help answer the prompt. The score is in the range `[0, 1]`, where 0 is the
// least likely and 1 is the most likely. This score is only populated when
// google search grounding and dynamic retrieval is enabled. It will be
// compared to the threshold to determine whether to trigger google search.
float google_search_dynamic_retrieval_score = 2
[(google.api.field_behavior) = OPTIONAL];
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ message FeatureView {
// database. For example, "CRON_TZ=America/New_York 1 * * * *", or
// "TZ=America/New_York 1 * * * *".
string cron = 1;

// Optional. If true, syncs the FeatureView in a continuous manner to Online
// Store.
bool continuous = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Configuration for vector indexing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ message DeployedIndex {
//
// Note: we only support up to 5 deployment groups(not including 'default').
string deployment_group = 11 [(google.api.field_behavior) = OPTIONAL];

// Optional. If set for PSC deployed index, PSC connection will be
// automatically created after deployment is done and the endpoint information
// is populated in private_endpoints.psc_automated_endpoints.
repeated PSCAutomationConfig psc_automation_configs = 19
[(google.api.field_behavior) = OPTIONAL];
}

// Used to set up the auth on the DeployedIndex's private endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ option (google.api.resource_definition) = {
pattern: "projects/{project}/regions/{region}/networkAttachments/{networkattachment}"
};

// PSC config that is used to automatically create forwarding rule via
// ServiceConnectionMap.
message PSCAutomationConfig {
// Required. Project id used to create forwarding rule.
string project_id = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The full name of the Google Compute Engine
// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
// [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
// `projects/{project}/global/networks/{network}`.
// Where {project} is a project number, as in '12345', and {network} is
// network name.
string network = 2 [(google.api.field_behavior) = REQUIRED];
}

// Represents configuration for private service connect.
message PrivateServiceConnectConfig {
// Required. If true, expose the IndexEndpoint via private service connect.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,29 @@ message VertexAISearch {
}

// Tool to retrieve public web data for grounding, powered by Google.
message GoogleSearchRetrieval {}
message GoogleSearchRetrieval {
// Specifies the dynamic retrieval configuration for the given source.
DynamicRetrievalConfig dynamic_retrieval_config = 2;
}

// Describes the options to customize dynamic retrieval.
message DynamicRetrievalConfig {
// The mode of the predictor to be used in dynamic retrieval.
enum Mode {
// Always trigger retrieval.
MODE_UNSPECIFIED = 0;

// Run retrieval only when system decides it is necessary.
MODE_DYNAMIC = 1;
}

// The mode of the predictor to be used in dynamic retrieval.
Mode mode = 1;

// Optional. The threshold to be used in dynamic retrieval.
// If not set, a system default value is used.
optional float dynamic_threshold = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Tool config. This config is shared for all tools provided in the request.
message ToolConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,12 @@ message GroundingMetadata {
// Optional. List of grounding support.
repeated GroundingSupport grounding_supports = 6
[(google.api.field_behavior) = OPTIONAL];

// Optional. Output only. Retrieval metadata.
optional RetrievalMetadata retrieval_metadata = 7 [
(google.api.field_behavior) = OPTIONAL,
(google.api.field_behavior) = OUTPUT_ONLY
];
}

// Google search entry point.
Expand All @@ -573,3 +579,14 @@ message SearchEntryPoint {
// url> tuple.
bytes sdk_blob = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Metadata related to retrieval in the grounding flow.
message RetrievalMetadata {
// Optional. Score indicating how likely information from google search could
// help answer the prompt. The score is in the range [0, 1], where 0 is the
// least likely and 1 is the most likely. This score is only populated when
// google search grounding and dynamic retrieval is enabled. It will be
// compared to the threshold to determine whether to trigger google search.
float google_search_dynamic_retrieval_score = 2
[(google.api.field_behavior) = OPTIONAL];
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "google/cloud/aiplatform/v1beta1/encryption_spec.proto";
import "google/cloud/aiplatform/v1beta1/execution.proto";
import "google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto";
import "google/cloud/aiplatform/v1beta1/pipeline_state.proto";
import "google/cloud/aiplatform/v1beta1/service_networking.proto";
import "google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto";
import "google/cloud/aiplatform/v1beta1/value.proto";
import "google/protobuf/struct.proto";
Expand Down Expand Up @@ -198,6 +199,10 @@ message PipelineJob {
// Example: ['vertex-ai-ip-range'].
repeated string reserved_ip_ranges = 25;

// Optional. Configuration for PSC-I for PipelineJob.
PscInterfaceConfig psc_interface_config = 31
[(google.api.field_behavior) = OPTIONAL];

// A template uri from where the
// [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec],
// if empty, will be downloaded. Currently, only uri from Vertex Template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ message PrivateServiceConnectConfig {
// attachment.
repeated string project_allowlist = 2;

// Optional. If set to true, enable secure private service connect with IAM
// authorization. Otherwise, private service connect will be done without
// authorization. Note latency will be slightly increased if authorization is
// enabled.
bool enable_secure_private_service_connect = 4
[(google.api.field_behavior) = OPTIONAL];

// Output only. The name of the generated service attachment resource.
// This is only populated if the endpoint is deployed with
// PrivateServiceConnect.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,29 @@ message VertexAISearch {
}

// Tool to retrieve public web data for grounding, powered by Google.
message GoogleSearchRetrieval {}
message GoogleSearchRetrieval {
// Specifies the dynamic retrieval configuration for the given source.
DynamicRetrievalConfig dynamic_retrieval_config = 2;
}

// Describes the options to customize dynamic retrieval.
message DynamicRetrievalConfig {
// The mode of the predictor to be used in dynamic retrieval.
enum Mode {
// Always trigger retrieval.
MODE_UNSPECIFIED = 0;

// Run retrieval only when system decides it is necessary.
MODE_DYNAMIC = 1;
}

// The mode of the predictor to be used in dynamic retrieval.
Mode mode = 1;

// Optional. The threshold to be used in dynamic retrieval.
// If not set, a system default value is used.
optional float dynamic_threshold = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Tool config. This config is shared for all tools provided in the request.
message ToolConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/api/resource.proto";
import "google/cloud/aiplatform/v1beta1/content.proto";
import "google/cloud/aiplatform/v1beta1/encryption_spec.proto";
import "google/cloud/aiplatform/v1beta1/job_state.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";

Expand Down Expand Up @@ -52,6 +53,9 @@ message TuningJob {

// Tuning Spec for Distillation.
DistillationSpec distillation_spec = 17;

// Tuning Spec for open sourced and third party Partner models.
PartnerModelTuningSpec partner_model_tuning_spec = 21;
}

// Output only. Identifier. Resource name of a TuningJob. Format:
Expand Down Expand Up @@ -451,6 +455,21 @@ message DistillationHyperParameters {
[(google.api.field_behavior) = OPTIONAL];
}

// Tuning spec for Partner models.
message PartnerModelTuningSpec {
// Required. Cloud Storage path to file containing training dataset for
// tuning. The dataset must be formatted as a JSONL file.
string training_dataset_uri = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. Cloud Storage path to file containing validation dataset for
// tuning. The dataset must be formatted as a JSONL file.
string validation_dataset_uri = 2 [(google.api.field_behavior) = OPTIONAL];

// Hyperparameters for tuning. The accepted hyper_parameters and their valid
// range of values will differ depending on the base model.
map<string, google.protobuf.Value> hyper_parameters = 3;
}

// TunedModel Reference for legacy model migration.
message TunedModelRef {
// The Tuned Model Reference for the model.
Expand Down
Loading
Loading