Skip to content

Commit

Permalink
feat: add partner_model_tuning_spec to TuningJob
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 683655446

Source-Link: googleapis/googleapis@4be7103

Source-Link: googleapis/googleapis-gen@2f7b2ea
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjJmN2IyZWE2NDMyMGNlYTFjYWVhYzMwMTYzNWY1MzEzODUwYzk5ZDgifQ==
  • Loading branch information
gcf-owl-bot[bot] committed Oct 8, 2024
1 parent 6c56523 commit 530c986
Show file tree
Hide file tree
Showing 4 changed files with 494 additions and 4 deletions.
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
117 changes: 116 additions & 1 deletion owl-bot-staging/google-cloud-aiplatform/v1beta1/protos/protos.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62746,6 +62746,9 @@ export namespace google {
/** TuningJob distillationSpec */
distillationSpec?: (google.cloud.aiplatform.v1beta1.IDistillationSpec|null);

/** TuningJob partnerModelTuningSpec */
partnerModelTuningSpec?: (google.cloud.aiplatform.v1beta1.IPartnerModelTuningSpec|null);

/** TuningJob name */
name?: (string|null);

Expand Down Expand Up @@ -62810,6 +62813,9 @@ export namespace google {
/** TuningJob distillationSpec. */
public distillationSpec?: (google.cloud.aiplatform.v1beta1.IDistillationSpec|null);

/** TuningJob partnerModelTuningSpec. */
public partnerModelTuningSpec?: (google.cloud.aiplatform.v1beta1.IPartnerModelTuningSpec|null);

/** TuningJob name. */
public name: string;

Expand Down Expand Up @@ -62859,7 +62865,7 @@ export namespace google {
public sourceModel?: "baseModel";

/** TuningJob tuningSpec. */
public tuningSpec?: ("supervisedTuningSpec"|"distillationSpec");
public tuningSpec?: ("supervisedTuningSpec"|"distillationSpec"|"partnerModelTuningSpec");

/**
* Creates a new TuningJob instance using the specified properties.
Expand Down Expand Up @@ -64536,6 +64542,115 @@ export namespace google {
public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a PartnerModelTuningSpec. */
interface IPartnerModelTuningSpec {

/** PartnerModelTuningSpec trainingDatasetUri */
trainingDatasetUri?: (string|null);

/** PartnerModelTuningSpec validationDatasetUri */
validationDatasetUri?: (string|null);

/** PartnerModelTuningSpec hyperParameters */
hyperParameters?: ({ [k: string]: google.protobuf.IValue }|null);
}

/** Represents a PartnerModelTuningSpec. */
class PartnerModelTuningSpec implements IPartnerModelTuningSpec {

/**
* Constructs a new PartnerModelTuningSpec.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.aiplatform.v1beta1.IPartnerModelTuningSpec);

/** PartnerModelTuningSpec trainingDatasetUri. */
public trainingDatasetUri: string;

/** PartnerModelTuningSpec validationDatasetUri. */
public validationDatasetUri: string;

/** PartnerModelTuningSpec hyperParameters. */
public hyperParameters: { [k: string]: google.protobuf.IValue };

/**
* Creates a new PartnerModelTuningSpec instance using the specified properties.
* @param [properties] Properties to set
* @returns PartnerModelTuningSpec instance
*/
public static create(properties?: google.cloud.aiplatform.v1beta1.IPartnerModelTuningSpec): google.cloud.aiplatform.v1beta1.PartnerModelTuningSpec;

/**
* Encodes the specified PartnerModelTuningSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PartnerModelTuningSpec.verify|verify} messages.
* @param message PartnerModelTuningSpec message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.aiplatform.v1beta1.IPartnerModelTuningSpec, writer?: $protobuf.Writer): $protobuf.Writer;

/**
* Encodes the specified PartnerModelTuningSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PartnerModelTuningSpec.verify|verify} messages.
* @param message PartnerModelTuningSpec message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPartnerModelTuningSpec, writer?: $protobuf.Writer): $protobuf.Writer;

/**
* Decodes a PartnerModelTuningSpec message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns PartnerModelTuningSpec
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.PartnerModelTuningSpec;

/**
* Decodes a PartnerModelTuningSpec message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns PartnerModelTuningSpec
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.PartnerModelTuningSpec;

/**
* Verifies a PartnerModelTuningSpec message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);

/**
* Creates a PartnerModelTuningSpec message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns PartnerModelTuningSpec
*/
public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PartnerModelTuningSpec;

/**
* Creates a plain object from a PartnerModelTuningSpec message. Also converts values to other types if specified.
* @param message PartnerModelTuningSpec
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.aiplatform.v1beta1.PartnerModelTuningSpec, options?: $protobuf.IConversionOptions): { [k: string]: any };

/**
* Converts this PartnerModelTuningSpec to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };

/**
* Gets the default type url for PartnerModelTuningSpec
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a TunedModelRef. */
interface ITunedModelRef {

Expand Down
Loading

0 comments on commit 530c986

Please sign in to comment.