Returns the alphaEvolvePrograms Resource.
Returns the operations Resource.
acquirePrograms(parent, body=None, x__xgafv=None)
Acquires one or more AlphaEvolveProgram from the generated queue of programs for evaluation.
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a new AlphaEvolveExperiment.
Deletes an experiment provided the experiment is in an end state (e.g. created, failed, succeeded).
Get an existing AlphaEvolveExperiment.
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
List all AlphaEvolveExperiments in a given session.
Retrieves the next page of results.
resume(name, body=None, x__xgafv=None)
Resumes a workflow to process the AlphaEvolveExperiment.
start(name, body=None, x__xgafv=None)
Starts a workflow to process the AlphaEvolveExperiment.
submitProgramsEvaluations(parent, body=None, x__xgafv=None)
Adds an AlphaEvolveProgramEvaluation to the experiment.
acquirePrograms(parent, body=None, x__xgafv=None)
Acquires one or more AlphaEvolveProgram from the generated queue of programs for evaluation.
Args:
parent: string, Required. The parent resource name (AlphaEvolveExperiment) of the AlphaEvolveExperiment. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for AlphaEvolveService.AcquirePrograms.
"desiredProgramsCount": 42, # Optional. Number of evolved programs to acquire. If not set, the default value is 1.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for AlphaEvolveService.AcquirePrograms.
"programs": [ # Output only. List of acquired program candidates to be evaluated. Note: The number of programs acquired might be lower than requested.
{ # Represents a single program to be used within the context of an AlphaEvolve experiment.
"content": { # A self-contained message containing the content of a program. Can represent a collection of files. # Optional. Content of the program.
"description": "A String", # Optional. Description of the program.
"files": [ # Required. A list of source files that make up the overall program.
{ # A single source file with its path, content and metadata.
"content": "A String", # Required. The raw content of the file. This is a string and not bytes, because it should be ultimately processed by the LLM as text.
"description": "A String", # Optional. Additional description of the file.
"path": "A String", # Required. The relative path of the file, including the filename. e.g., "src/main.py", "utils/helpers.js", "README.md"
"programLanguage": "A String", # Optional. The programming language of the file.
},
],
},
"createTime": "A String", # Output only. Time when the program was created.
"evaluation": { # Evaluation results for a program candidate. # Optional. Evaluation results for the program.
"insights": { # Evaluation insights for a program. # Optional. Represents various insights about the candidate, which are not directly used as optimization target, but that can be used to improve subsequent generations, and as such can be used to construct the evolution prompt.
"insights": [ # Optional. List of evaluation insights.
{ # A single evaluation insight.
"label": "A String", # Optional. Label of the insight.
"text": "A String", # Optional. Text of the insight.
},
],
},
"scores": { # Contains the evaluation scores for the target metrics to optimize. # Optional. Contains the evaluation scores for the target metrics to optimize.
"scores": [ # Required. List of evaluation scores.
{ # Score for a single metric.
"metric": "A String", # Required. Name of the metric.
"score": 3.14, # Required. Score of a program for this metric.
},
],
},
},
"lockToken": "A String", # Optional. Lock token for the program.
"name": "A String", # Identifier. Unique identifier for the program. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}/alphaEvolvePrograms/{alpha_evolve_program}`
"parentPrograms": [ # Output only. Optionally specifies which parent programs this program was evolved from. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}/alphaEvolvePrograms/{alpha_evolve_program}`
"A String",
],
"state": "A String", # Output only. State of the program.
},
],
}
close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a new AlphaEvolveExperiment.
Args:
parent: string, Required. The parent resource name (Session) of the experiment. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` (required)
body: object, The request body.
The object takes the form of:
{ # An experiment is a single run of the AlphaEvolve agent, an evolutionary coding agent powered by LLM for algorithm discovery and optimization.
"config": { # Configuration of an experiment. # Required. Experiment configuration.
"evolutionSettings": { # Evolution settings for the experiment. # Optional. Evolution settings for the experiment.
"parentSamplingConfig": { # Configuration for parent sampling. # Optional. Parent sampling configuration.
"paretoSamplingConfig": { # Configuration for Pareto sampling. # Optional. Pareto sampling configuration.
"paretoSamplingProbability": 3.14, # Optional. Probability [0.0, 1.0] of sampling parent programs from the Pareto frontier instead of normal fitness-based sampling during candidate generation. Useful when optimizing multiple metrics simultaneously. Default 0.0 (disabled). Only effective when evaluation returns multiple metrics in scores_to_optimize.
},
},
},
"generationSettings": { # Generation settings for the experiment. # Optional. Generation settings for the experiment, controlling how new program candidates are generated, including things LLM parameters and user-provided context and prompts.
"context": "A String", # Optional. Additional user-provided context to be used during generation.
"includeFullProgramInPrompt": True or False, # Optional. When true, the LLM prompt includes the full program text (both mutable EVOLVE-BLOCK regions and immutable boilerplate). When false (default), only the mutable EVOLVE-BLOCK regions are shown, saving context window.
"models": [ # Optional. Per-model configuration. See `ModelConfig` for details. If left unset, the server selects a default model.
{ # Per-model configuration. Mutually exclusive with `model_mixture` and `model`: when `models` is set, both `model_mixture` and `model` must be left unset. The same allowed-model list and at-most-2-models rule as for `model_mixture` apply. In addition, each entry may specify a per-model `temperature` for LLM sampling. Unlike `model_mixture`, weights here are *relative*: only their ratios matter (the server normalizes them), so callers may use any positive numbers without having to ensure they sum to 1.0.
"name": "A String", # Required. Model name (e.g. `gemini-2.5-flash`, `gemini-3.1-pro-preview`). See `model_mixture` for the list of allowed models.
"weight": 3.14, # Optional. Relative weight for this model in the mixture. Must be a finite, strictly positive value. Weights across all entries are normalized server-side, so they need not sum to 1.0. Defaults to 1.0 when unset, which is convenient when configuring a single model or an even mixture. Some Pro-tier models are capped at most 50% of the total weight; requests violating that cap are rejected with INVALID_ARGUMENT.
},
],
},
"problemDescription": "A String", # Required. Description of the problem to be solved by the experiment.
"programLanguage": "A String", # Required. Primary programming language of the code being optimized.
"runSettings": { # Run settings for the experiment. # Required. Run settings for the experiment, controlling the overall behavior of the experiment run.
"concurrency": 42, # Required. Maximum number of programs that can be generated in parallel. Must be positive.
"maxDuration": "A String", # Optional. Maximum duration of the experiment. If unset, defaults to 24 hours.
"maxPrograms": 42, # Required. Maximum number of programs to generate during the experiment run. The initial program counts towards this limit. Must be greater than 1.
},
"title": "A String", # Required. Title of the experiment.
},
"createTime": "A String", # Output only. Time when the experiment was created.
"initialAlphaEvolveProgram": "A String", # Output only. Specifies the name of the seed program used to start the experiment.
"name": "A String", # Identifier. The full resource name of the experiment. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}`
"state": "A String", # Output only. The state of the experiment.
"stats": { # Stats about the experiment. # Output only. Experiment stats.
"candidatesCount": 42, # Output only. Number of candidates generated.
"evaluatedCandidatesCount": 42, # Output only. Number of candidates evaluated.
"inputTokenCount": "A String", # Output only. Number of billed input tokens consumed by the experiment.
"outputTokenCount": "A String", # Output only. Number of billed output tokens consumed by the experiment.
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An experiment is a single run of the AlphaEvolve agent, an evolutionary coding agent powered by LLM for algorithm discovery and optimization.
"config": { # Configuration of an experiment. # Required. Experiment configuration.
"evolutionSettings": { # Evolution settings for the experiment. # Optional. Evolution settings for the experiment.
"parentSamplingConfig": { # Configuration for parent sampling. # Optional. Parent sampling configuration.
"paretoSamplingConfig": { # Configuration for Pareto sampling. # Optional. Pareto sampling configuration.
"paretoSamplingProbability": 3.14, # Optional. Probability [0.0, 1.0] of sampling parent programs from the Pareto frontier instead of normal fitness-based sampling during candidate generation. Useful when optimizing multiple metrics simultaneously. Default 0.0 (disabled). Only effective when evaluation returns multiple metrics in scores_to_optimize.
},
},
},
"generationSettings": { # Generation settings for the experiment. # Optional. Generation settings for the experiment, controlling how new program candidates are generated, including things LLM parameters and user-provided context and prompts.
"context": "A String", # Optional. Additional user-provided context to be used during generation.
"includeFullProgramInPrompt": True or False, # Optional. When true, the LLM prompt includes the full program text (both mutable EVOLVE-BLOCK regions and immutable boilerplate). When false (default), only the mutable EVOLVE-BLOCK regions are shown, saving context window.
"models": [ # Optional. Per-model configuration. See `ModelConfig` for details. If left unset, the server selects a default model.
{ # Per-model configuration. Mutually exclusive with `model_mixture` and `model`: when `models` is set, both `model_mixture` and `model` must be left unset. The same allowed-model list and at-most-2-models rule as for `model_mixture` apply. In addition, each entry may specify a per-model `temperature` for LLM sampling. Unlike `model_mixture`, weights here are *relative*: only their ratios matter (the server normalizes them), so callers may use any positive numbers without having to ensure they sum to 1.0.
"name": "A String", # Required. Model name (e.g. `gemini-2.5-flash`, `gemini-3.1-pro-preview`). See `model_mixture` for the list of allowed models.
"weight": 3.14, # Optional. Relative weight for this model in the mixture. Must be a finite, strictly positive value. Weights across all entries are normalized server-side, so they need not sum to 1.0. Defaults to 1.0 when unset, which is convenient when configuring a single model or an even mixture. Some Pro-tier models are capped at most 50% of the total weight; requests violating that cap are rejected with INVALID_ARGUMENT.
},
],
},
"problemDescription": "A String", # Required. Description of the problem to be solved by the experiment.
"programLanguage": "A String", # Required. Primary programming language of the code being optimized.
"runSettings": { # Run settings for the experiment. # Required. Run settings for the experiment, controlling the overall behavior of the experiment run.
"concurrency": 42, # Required. Maximum number of programs that can be generated in parallel. Must be positive.
"maxDuration": "A String", # Optional. Maximum duration of the experiment. If unset, defaults to 24 hours.
"maxPrograms": 42, # Required. Maximum number of programs to generate during the experiment run. The initial program counts towards this limit. Must be greater than 1.
},
"title": "A String", # Required. Title of the experiment.
},
"createTime": "A String", # Output only. Time when the experiment was created.
"initialAlphaEvolveProgram": "A String", # Output only. Specifies the name of the seed program used to start the experiment.
"name": "A String", # Identifier. The full resource name of the experiment. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}`
"state": "A String", # Output only. The state of the experiment.
"stats": { # Stats about the experiment. # Output only. Experiment stats.
"candidatesCount": 42, # Output only. Number of candidates generated.
"evaluatedCandidatesCount": 42, # Output only. Number of candidates evaluated.
"inputTokenCount": "A String", # Output only. Number of billed input tokens consumed by the experiment.
"outputTokenCount": "A String", # Output only. Number of billed output tokens consumed by the experiment.
},
}
delete(name, x__xgafv=None)
Deletes an experiment provided the experiment is in an end state (e.g. created, failed, succeeded).
Args:
name: string, Required. The full resource name of the experiment to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}` (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Get an existing AlphaEvolveExperiment.
Args:
name: string, Required. The full resource name of the experiment. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}` (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An experiment is a single run of the AlphaEvolve agent, an evolutionary coding agent powered by LLM for algorithm discovery and optimization.
"config": { # Configuration of an experiment. # Required. Experiment configuration.
"evolutionSettings": { # Evolution settings for the experiment. # Optional. Evolution settings for the experiment.
"parentSamplingConfig": { # Configuration for parent sampling. # Optional. Parent sampling configuration.
"paretoSamplingConfig": { # Configuration for Pareto sampling. # Optional. Pareto sampling configuration.
"paretoSamplingProbability": 3.14, # Optional. Probability [0.0, 1.0] of sampling parent programs from the Pareto frontier instead of normal fitness-based sampling during candidate generation. Useful when optimizing multiple metrics simultaneously. Default 0.0 (disabled). Only effective when evaluation returns multiple metrics in scores_to_optimize.
},
},
},
"generationSettings": { # Generation settings for the experiment. # Optional. Generation settings for the experiment, controlling how new program candidates are generated, including things LLM parameters and user-provided context and prompts.
"context": "A String", # Optional. Additional user-provided context to be used during generation.
"includeFullProgramInPrompt": True or False, # Optional. When true, the LLM prompt includes the full program text (both mutable EVOLVE-BLOCK regions and immutable boilerplate). When false (default), only the mutable EVOLVE-BLOCK regions are shown, saving context window.
"models": [ # Optional. Per-model configuration. See `ModelConfig` for details. If left unset, the server selects a default model.
{ # Per-model configuration. Mutually exclusive with `model_mixture` and `model`: when `models` is set, both `model_mixture` and `model` must be left unset. The same allowed-model list and at-most-2-models rule as for `model_mixture` apply. In addition, each entry may specify a per-model `temperature` for LLM sampling. Unlike `model_mixture`, weights here are *relative*: only their ratios matter (the server normalizes them), so callers may use any positive numbers without having to ensure they sum to 1.0.
"name": "A String", # Required. Model name (e.g. `gemini-2.5-flash`, `gemini-3.1-pro-preview`). See `model_mixture` for the list of allowed models.
"weight": 3.14, # Optional. Relative weight for this model in the mixture. Must be a finite, strictly positive value. Weights across all entries are normalized server-side, so they need not sum to 1.0. Defaults to 1.0 when unset, which is convenient when configuring a single model or an even mixture. Some Pro-tier models are capped at most 50% of the total weight; requests violating that cap are rejected with INVALID_ARGUMENT.
},
],
},
"problemDescription": "A String", # Required. Description of the problem to be solved by the experiment.
"programLanguage": "A String", # Required. Primary programming language of the code being optimized.
"runSettings": { # Run settings for the experiment. # Required. Run settings for the experiment, controlling the overall behavior of the experiment run.
"concurrency": 42, # Required. Maximum number of programs that can be generated in parallel. Must be positive.
"maxDuration": "A String", # Optional. Maximum duration of the experiment. If unset, defaults to 24 hours.
"maxPrograms": 42, # Required. Maximum number of programs to generate during the experiment run. The initial program counts towards this limit. Must be greater than 1.
},
"title": "A String", # Required. Title of the experiment.
},
"createTime": "A String", # Output only. Time when the experiment was created.
"initialAlphaEvolveProgram": "A String", # Output only. Specifies the name of the seed program used to start the experiment.
"name": "A String", # Identifier. The full resource name of the experiment. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}`
"state": "A String", # Output only. The state of the experiment.
"stats": { # Stats about the experiment. # Output only. Experiment stats.
"candidatesCount": 42, # Output only. Number of candidates generated.
"evaluatedCandidatesCount": 42, # Output only. Number of candidates evaluated.
"inputTokenCount": "A String", # Output only. Number of billed input tokens consumed by the experiment.
"outputTokenCount": "A String", # Output only. Number of billed output tokens consumed by the experiment.
},
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
List all AlphaEvolveExperiments in a given session.
Args:
parent: string, Required. The parent resource name (Session) of the Session. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` (required)
pageSize: integer, Optional. The maximum number of experiments to return. The service may return fewer than this value.
pageToken: string, Optional. A page token, received from a previous `ListAlphaEvolveExperiments` call. Provide this to retrieve the subsequent page.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for AlphaEvolveService.ListAlphaEvolveExperiments.
"alphaEvolveExperiments": [ # Output only. List of experiments.
{ # An experiment is a single run of the AlphaEvolve agent, an evolutionary coding agent powered by LLM for algorithm discovery and optimization.
"config": { # Configuration of an experiment. # Required. Experiment configuration.
"evolutionSettings": { # Evolution settings for the experiment. # Optional. Evolution settings for the experiment.
"parentSamplingConfig": { # Configuration for parent sampling. # Optional. Parent sampling configuration.
"paretoSamplingConfig": { # Configuration for Pareto sampling. # Optional. Pareto sampling configuration.
"paretoSamplingProbability": 3.14, # Optional. Probability [0.0, 1.0] of sampling parent programs from the Pareto frontier instead of normal fitness-based sampling during candidate generation. Useful when optimizing multiple metrics simultaneously. Default 0.0 (disabled). Only effective when evaluation returns multiple metrics in scores_to_optimize.
},
},
},
"generationSettings": { # Generation settings for the experiment. # Optional. Generation settings for the experiment, controlling how new program candidates are generated, including things LLM parameters and user-provided context and prompts.
"context": "A String", # Optional. Additional user-provided context to be used during generation.
"includeFullProgramInPrompt": True or False, # Optional. When true, the LLM prompt includes the full program text (both mutable EVOLVE-BLOCK regions and immutable boilerplate). When false (default), only the mutable EVOLVE-BLOCK regions are shown, saving context window.
"models": [ # Optional. Per-model configuration. See `ModelConfig` for details. If left unset, the server selects a default model.
{ # Per-model configuration. Mutually exclusive with `model_mixture` and `model`: when `models` is set, both `model_mixture` and `model` must be left unset. The same allowed-model list and at-most-2-models rule as for `model_mixture` apply. In addition, each entry may specify a per-model `temperature` for LLM sampling. Unlike `model_mixture`, weights here are *relative*: only their ratios matter (the server normalizes them), so callers may use any positive numbers without having to ensure they sum to 1.0.
"name": "A String", # Required. Model name (e.g. `gemini-2.5-flash`, `gemini-3.1-pro-preview`). See `model_mixture` for the list of allowed models.
"weight": 3.14, # Optional. Relative weight for this model in the mixture. Must be a finite, strictly positive value. Weights across all entries are normalized server-side, so they need not sum to 1.0. Defaults to 1.0 when unset, which is convenient when configuring a single model or an even mixture. Some Pro-tier models are capped at most 50% of the total weight; requests violating that cap are rejected with INVALID_ARGUMENT.
},
],
},
"problemDescription": "A String", # Required. Description of the problem to be solved by the experiment.
"programLanguage": "A String", # Required. Primary programming language of the code being optimized.
"runSettings": { # Run settings for the experiment. # Required. Run settings for the experiment, controlling the overall behavior of the experiment run.
"concurrency": 42, # Required. Maximum number of programs that can be generated in parallel. Must be positive.
"maxDuration": "A String", # Optional. Maximum duration of the experiment. If unset, defaults to 24 hours.
"maxPrograms": 42, # Required. Maximum number of programs to generate during the experiment run. The initial program counts towards this limit. Must be greater than 1.
},
"title": "A String", # Required. Title of the experiment.
},
"createTime": "A String", # Output only. Time when the experiment was created.
"initialAlphaEvolveProgram": "A String", # Output only. Specifies the name of the seed program used to start the experiment.
"name": "A String", # Identifier. The full resource name of the experiment. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}`
"state": "A String", # Output only. The state of the experiment.
"stats": { # Stats about the experiment. # Output only. Experiment stats.
"candidatesCount": 42, # Output only. Number of candidates generated.
"evaluatedCandidatesCount": 42, # Output only. Number of candidates evaluated.
"inputTokenCount": "A String", # Output only. Number of billed input tokens consumed by the experiment.
"outputTokenCount": "A String", # Output only. Number of billed output tokens consumed by the experiment.
},
},
],
"nextPageToken": "A String", # Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
}
list_next()
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
resume(name, body=None, x__xgafv=None)
Resumes a workflow to process the AlphaEvolveExperiment.
Args:
name: string, Required. Experiment to resume. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for AlphaEvolveService.ResumeExperiment.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
"done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
"error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
"code": 42, # The status code, which should be an enum value of google.rpc.Code.
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
"message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
"metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
"name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
"response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
}
start(name, body=None, x__xgafv=None)
Starts a workflow to process the AlphaEvolveExperiment.
Args:
name: string, Required. Experiment to start. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for AlphaEvolveService.StartExperiment.
"name": "A String", # Required. Experiment to start. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}`
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
"done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
"error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
"code": 42, # The status code, which should be an enum value of google.rpc.Code.
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
"message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
"metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
"name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
"response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
}
submitProgramsEvaluations(parent, body=None, x__xgafv=None)
Adds an AlphaEvolveProgramEvaluation to the experiment.
Args:
parent: string, Required. The parent resource name (AlphaEvolveExperiment) of the Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for AlphaEvolveService.SubmitProgramsEvaluations.
"evaluationSubmissions": [ # Required. List of program evaluations to submit. At this time, only one evaluation submission is supported.
{ # Evaluation submission for a program candidate.
"evaluation": { # Evaluation results for a program candidate. # Required. Evaluation results for the program candidate.
"insights": { # Evaluation insights for a program. # Optional. Represents various insights about the candidate, which are not directly used as optimization target, but that can be used to improve subsequent generations, and as such can be used to construct the evolution prompt.
"insights": [ # Optional. List of evaluation insights.
{ # A single evaluation insight.
"label": "A String", # Optional. Label of the insight.
"text": "A String", # Optional. Text of the insight.
},
],
},
"scores": { # Contains the evaluation scores for the target metrics to optimize. # Optional. Contains the evaluation scores for the target metrics to optimize.
"scores": [ # Required. List of evaluation scores.
{ # Score for a single metric.
"metric": "A String", # Required. Name of the metric.
"score": 3.14, # Required. Score of a program for this metric.
},
],
},
},
"lockToken": "A String", # Required. Lock token for the program obtained in the AcquireAlphaEvolvePrograms call.
"program": "A String", # Required. Unique identifier for the program. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alpha_evolve_experiment}/alphaEvolvePrograms/{alpha_evolve_program}`
},
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for AlphaEvolveService.SubmitProgramsEvaluations.
}