code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def create_batch( self, batch_id: str, batch_request: Dict[str, Any], ) -> Dict[str, Any]: """Common function for creating a batch workload. Args: batch_id: Dataproc batch id. batch_request: Dict of the Batch resource. For more details, see: https://cloud.google.com/data...
Common function for creating a batch workload. Args: batch_id: Dataproc batch id. batch_request: Dict of the Batch resource. For more details, see: https://cloud.google.com/dataproc-serverless/docs/reference/rest/v1/projects.locations.batches#resource:-batch Returns: Dict of the long...
create_batch
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/dataproc/utils/dataproc_util.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/dataproc/utils/dataproc_util.py
Apache-2.0
def create_batch( type: str, project: str, location: str, batch_id: str, payload: str, gcp_resources: str, ) -> Dict[str, Any]: """Common function for creating Dataproc Batch workloads. Args: type: Dataproc job type that is written to gcp_resources. project: Project to launch the ba...
Common function for creating Dataproc Batch workloads. Args: type: Dataproc job type that is written to gcp_resources. project: Project to launch the batch workload. location: Location to launch the batch workload. batch_id: Dataproc batch id. payload: A json serialized Batch resource. For more d...
create_batch
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/dataproc/utils/dataproc_util.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/dataproc/utils/dataproc_util.py
Apache-2.0
def create_endpoint( type, project, location, payload, gcp_resources, executor_input, ): """Create endpoint and poll the LongRunningOperator till it reaches a final state.""" api_endpoint = location + '-aiplatform.googleapis.com' vertex_uri_prefix = f'https://{api_endpoint}/v1/' create_e...
Create endpoint and poll the LongRunningOperator till it reaches a final state.
create_endpoint
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/endpoint/create_endpoint/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/endpoint/create_endpoint/remote_runner.py
Apache-2.0
def delete_endpoint( type, project, location, payload, gcp_resources, ): """Delete endpoint and poll the LongRunningOperator till it reaches a final state. """ # TODO(IronPan) temporarily remove the empty fields from the spec delete_endpoint_request = json_util.recursive_remove_empty( ...
Delete endpoint and poll the LongRunningOperator till it reaches a final state.
delete_endpoint
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/endpoint/delete_endpoint/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/endpoint/delete_endpoint/remote_runner.py
Apache-2.0
def deploy_model( type, project, location, payload, gcp_resources, ): """Deploy model and poll the LongRunningOperator till it reaches a final state.""" # TODO(IronPan) temporarily remove the empty fields from the spec deploy_model_request = json_util.recursive_remove_empty( json.loads(p...
Deploy model and poll the LongRunningOperator till it reaches a final state.
deploy_model
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/endpoint/deploy_model/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/endpoint/deploy_model/remote_runner.py
Apache-2.0
def undeploy_model( type, project, location, payload, gcp_resources, ): """Undeploy a model from the endpoint and poll the LongRunningOperator till it reaches a final state.""" # TODO(IronPan) temporarily remove the empty fields from the spec undeploy_model_request = json_util.recursive_remove...
Undeploy a model from the endpoint and poll the LongRunningOperator till it reaches a final state.
undeploy_model
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/endpoint/undeploy_model/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/endpoint/undeploy_model/remote_runner.py
Apache-2.0
def create_lro( self, create_url: str, request_body: str, gcp_resources: str, http_request: str = 'post', ) -> Any: """call the create API and get a LRO""" # Currently we don't check if operation already exists and continue from there # If this is desirable to the user and i...
call the create API and get a LRO
create_lro
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/lro_remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/lro_remote_runner.py
Apache-2.0
def poll_lro(self, lro: Any) -> Any: """Poll the LRO till it reaches a final state.""" lro_name = lro['name'] with execution_context.ExecutionContext( on_cancel=lambda: self.send_cancel_request(lro_name) ): request_url = f'{self.vertex_uri_prefix}{lro_name}' while ('done' not in lro)...
Poll the LRO till it reaches a final state.
poll_lro
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/lro_remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/lro_remote_runner.py
Apache-2.0
def __init__( self, pipeline_type: str, project: str, location: str, gcp_resources: str ): """Initializes a pipeline client and other common attributes.""" self.pipeline_type = pipeline_type self.project = project self.location = location self.gcp_resources = gcp_resources self.client_op...
Initializes a pipeline client and other common attributes.
__init__
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
Apache-2.0
def check_if_pipeline_exists(self) -> Optional[str]: """Checks if the pipeline already exists. Returns: The pipeline name if the pipeline already exists. Otherwise, None. """ if ( path.exists(self.gcp_resources) and os.stat(self.gcp_resources).st_size != 0 ): with open(s...
Checks if the pipeline already exists. Returns: The pipeline name if the pipeline already exists. Otherwise, None.
check_if_pipeline_exists
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
Apache-2.0
def create_pipeline( self, create_pipeline_fn: Callable[ [aiplatform.gapic.PipelineServiceClient, str, Any], Union[training_pipeline.TrainingPipeline, pipeline_job.PipelineJob], ], payload: str, ) -> str: """Creates a pipeline job or training pipeline. Args: ...
Creates a pipeline job or training pipeline. Args: create_pipeline_fn: A function that creates a pipeline from the pipeline client and pipeline spec. payload: JSON string to parse the pipeline spec from. Returns: The created pipeline name.
create_pipeline
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
Apache-2.0
def poll_pipeline( self, get_pipeline_fn: Callable[ [aiplatform.gapic.PipelineServiceClient, str], Union[training_pipeline.TrainingPipeline, pipeline_job.PipelineJob], ], pipeline_name: str, ) -> Union[training_pipeline.TrainingPipeline, pipeline_job.PipelineJob]: """Po...
Poll the pipeline status with automatic retry. Args: get_pipeline_fn: A function that polls the pipeline from the pipeline client and the pipeline name. pipeline_name: The name of the pipeline. Returns: The polled pipeline job or training pipeline. Raises: ValueError: The ...
poll_pipeline
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
Apache-2.0
def send_cancel_request(self, pipeline_name: str): """Cancels a pipeline with the given name.""" if not pipeline_name: return creds, _ = google.auth.default( scopes=['https://www.googleapis.com/auth/cloud-platform'] ) if not creds.valid: creds.refresh(google.auth.transport.reques...
Cancels a pipeline with the given name.
send_cancel_request
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/pipeline_remote_runner.py
Apache-2.0
def attach_system_labels(existing_labels=None): """Attaches system labels to the given existing_labels map. Will combine - any labels from the system environmental variable `VERTEX_AI_PIPELINES_RUN_LABELS`, with - any labels from the given existing_labels map. For key conflict, will respect existi...
Attaches system labels to the given existing_labels map. Will combine - any labels from the system environmental variable `VERTEX_AI_PIPELINES_RUN_LABELS`, with - any labels from the given existing_labels map. For key conflict, will respect existing_labels (since they are user provided). Args: ...
attach_system_labels
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/utils/gcp_labels_util.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/utils/gcp_labels_util.py
Apache-2.0
def __remove_empty(j): """Remove the empty fields in the Json.""" if isinstance(j, list): res = [] for i in j: # Don't remove empty primitive types. Only remove other empty types. if ( isinstance(i, int) or isinstance(i, float) or isinstance(i, str) or isi...
Remove the empty fields in the Json.
__remove_empty
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/utils/json_util.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/utils/json_util.py
Apache-2.0
def recursive_remove_empty(j): """Recursively remove the empty fields in the Json until there is no empty fields and sub-fields.""" # Handle special case where an empty "explanation_spec" "metadata" "outputs" # should not be removed. Introduced for b/245453693. temp_explanation_spec_metadata_outputs = None if...
Recursively remove the empty fields in the Json until there is no empty fields and sub-fields.
recursive_remove_empty
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/utils/json_util.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/gcp_launcher/utils/json_util.py
Apache-2.0
def main(argv): """Main entry. Expected input args are as follows: Project - Required. The project of which the resource will be launched. Region - Required. The region of which the resource will be launched. Type - Required. GCP launcher is a single container. This Enum will specify which reso...
Main entry. Expected input args are as follows: Project - Required. The project of which the resource will be launched. Region - Required. The region of which the resource will be launched. Type - Required. GCP launcher is a single container. This Enum will specify which resource to be launched. ...
main
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/infra_validation_job/launcher.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/infra_validation_job/launcher.py
Apache-2.0
def construct_infra_validation_job_payload(executor_input, payload): """Construct infra validation payload for CustomJob.""" # Extract artifact uri and prediction server uri artifact = ( json.loads(executor_input) .get('inputs', {}) .get('artifacts', {}) .get(ARTIFACT_PROPERTY_KEY_UNMANAGE...
Construct infra validation payload for CustomJob.
construct_infra_validation_job_payload
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/infra_validation_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/infra_validation_job/remote_runner.py
Apache-2.0
def delete_model( type: str, project: str, location: str, payload: str, gcp_resources: str, ) -> None: """Delete model and poll the LongRunningOperator till it reaches a final state.""" # TODO(IronPan) temporarily remove the empty fields from the spec delete_model_request = json_util.recursive...
Delete model and poll the LongRunningOperator till it reaches a final state.
delete_model
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/model/delete_model/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/model/delete_model/remote_runner.py
Apache-2.0
def export_model(type, project, location, payload, gcp_resources, output_info): """Export model and poll the LongRunningOperator till it reaches a final state.""" # TODO(IronPan) temporarily remove the empty fields from the spec export_model_request = json_util.recursive_remove_empty( json.loads(payload, st...
Export model and poll the LongRunningOperator till it reaches a final state.
export_model
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/model/export_model/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/model/export_model/remote_runner.py
Apache-2.0
def catch_write_and_raise( executor_input: str, exception_types: Union[ Type[Exception], Tuple[Type[Exception], ...] ] = Exception, ): """Context manager to catch specified exceptions, log them using error_surfacing, and then re-raise.""" try: yield except exception_types as e: task_er...
Context manager to catch specified exceptions, log them using error_surfacing, and then re-raise.
catch_write_and_raise
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/model/get_model/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/model/get_model/remote_runner.py
Apache-2.0
def upload_model( type: str, project: str, location: str, payload: str, gcp_resources: str, executor_input: str, parent_model_name: Optional[str] = None, ) -> None: """Upload model and poll the LongRunningOperator till it reaches a final state.""" api_endpoint = location + '-aiplatform.g...
Upload model and poll the LongRunningOperator till it reaches a final state.
upload_model
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/model/upload_model/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/model/upload_model/remote_runner.py
Apache-2.0
def main(): """Raises an error when notifications are requested on Kubeflow Pipelines. The notification email component works only on Vertex Pipelines. This function raises an exception when this component is used on Kubeflow Pipelines. """ raise NotImplementedError( 'The notification email component i...
Raises an error when notifications are requested on Kubeflow Pipelines. The notification email component works only on Vertex Pipelines. This function raises an exception when this component is used on Kubeflow Pipelines.
main
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/vertex_notification_email/executor.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/vertex_notification_email/executor.py
Apache-2.0
def wait_gcp_resources( type, project, location, payload, gcp_resources, ): """Poll the gcp resources till it reaches a final state.""" input_gcp_resources = Parse(payload, GcpResources()) if len(input_gcp_resources.resources) != 1: raise ValueError( 'Invalid payload: %s. Wait comp...
Poll the gcp resources till it reaches a final state.
wait_gcp_resources
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/v1/wait_gcp_resources/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/v1/wait_gcp_resources/remote_runner.py
Apache-2.0
def main(argv: List[str]) -> None: """Main entry. Expected input args are as follows: project - Required. The project of which the resource will be launched. location - Required. The region of which the resource will be launched. type - Required. GCPC launcher is a single container. This Enum will spec...
Main entry. Expected input args are as follows: project - Required. The project of which the resource will be launched. location - Required. The region of which the resource will be launched. type - Required. GCPC launcher is a single container. This Enum will specify which resource to be launched....
main
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/launcher.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/launcher.py
Apache-2.0
def render_payload(payload_str: str, params: Dict[str, Any]) -> str: """Renders a base64-encoded Custom Job payload in Jinja2 format.""" env = sandbox.ImmutableSandboxedEnvironment( autoescape=False, undefined=jinja2.StrictUndefined ) # We add an additional `json_dumps` filter because the builtin filter ...
Renders a base64-encoded Custom Job payload in Jinja2 format.
render_payload
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
Apache-2.0
def convert_key_value_param_list( param_list: Optional[List[List[str]]], type_cast: Callable[[str], Any], cmd_flag: str, ) -> Dict[str, Any]: """Converts a list of (key, [value]) pairs to a dictionary. Args: param_list: A list of (key, [value]) pairs of string type. type_cast: A function to...
Converts a list of (key, [value]) pairs to a dictionary. Args: param_list: A list of (key, [value]) pairs of string type. type_cast: A function to cast `value`, if exists, from string to a specific type. cmd_flag: The command-line flag for this list of parameters. This is used to pr...
convert_key_value_param_list
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
Apache-2.0
def convert_integer_params( integer_params: ParamListType, ) -> Dict[str, Optional[int]]: """Converts a list of (key, [integer]) pairs to a dictionary.""" return convert_key_value_param_list( param_list=integer_params, type_cast=int, cmd_flag='--set_integer' )
Converts a list of (key, [integer]) pairs to a dictionary.
convert_integer_params
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
Apache-2.0
def convert_string_params( string_params: ParamListType, ) -> Dict[str, Optional[str]]: """Converts a list of (key, [string]) pairs to a dictionary.""" return convert_key_value_param_list( param_list=string_params, type_cast=str, cmd_flag='--set_string' )
Converts a list of (key, [string]) pairs to a dictionary.
convert_string_params
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
Apache-2.0
def convert_float_params( float_params: ParamListType, ) -> Dict[str, Optional[float]]: """Converts a list of (key, [float]) pairs to a dictionary.""" return convert_key_value_param_list( param_list=float_params, type_cast=float, cmd_flag='--set_float' )
Converts a list of (key, [float]) pairs to a dictionary.
convert_float_params
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
Apache-2.0
def convert_boolean_params( boolean_params: ParamListType, ) -> Dict[str, Optional[bool]]: """Converts a list of (key, [boolean]) pairs to a dictionary.""" return convert_key_value_param_list( param_list=boolean_params, type_cast=lambda x: x.lower() in ['1', 'true', 'y', 'yes'], cmd_flag='--se...
Converts a list of (key, [boolean]) pairs to a dictionary.
convert_boolean_params
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
Apache-2.0
def convert_json_params( json_params: ParamListType, ) -> Dict[str, Any]: """Converts a list of (key, [json objects]) pairs to a dictionary.""" return convert_key_value_param_list( param_list=json_params, type_cast=json.loads, cmd_flag='--set_json' )
Converts a list of (key, [json objects]) pairs to a dictionary.
convert_json_params
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
Apache-2.0
def decode_and_render_payload( payload: str, int_params: ParamListType = None, string_params: ParamListType = None, float_params: ParamListType = None, boolean_params: ParamListType = None, json_params: ParamListType = None, ) -> str: """Decodes base64-encoded Jinja2 payload and renders it."""...
Decodes base64-encoded Jinja2 payload and renders it.
decode_and_render_payload
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/llm/templated_custom_job/remote_runner.py
Apache-2.0
def get_model_eval_resource_name( resource_uri_prefix: str, eval_importer_gcp_resources: str ) -> str: """Returns a Model Evaluation resource name from eval_importer_gcp_resource.""" resources = json.loads(eval_importer_gcp_resources)['resources'] for resource in resources: if resource['resourceType'] == ...
Returns a Model Evaluation resource name from eval_importer_gcp_resource.
get_model_eval_resource_name
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
Apache-2.0
def get_model_evaluation_slices_annotation_spec_map( client: aiplatform_v1.ModelServiceClient, model_evaluation_resource_name: str, ) -> Dict[str, str]: """Builds a map for converting slice values to slice resource names.""" annotation_spec_value_to_slice_name_map = {} # TODO(jsndai): add filter for only ...
Builds a map for converting slice values to slice resource names.
get_model_evaluation_slices_annotation_spec_map
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
Apache-2.0
def read_gcs_uri_as_text(gcs_uri: str) -> str: """Reads the contents of a file in Google Cloud Storage as text. Args: gcs_uri (str): The GCS URI to read, e.g. 'gs://my-bucket/path/to/myfile.txt'. Returns: str: The contents of the file as a string. """ if not gcs_uri.startswith('gs://'): ...
Reads the contents of a file in Google Cloud Storage as text. Args: gcs_uri (str): The GCS URI to read, e.g. 'gs://my-bucket/path/to/myfile.txt'. Returns: str: The contents of the file as a string.
read_gcs_uri_as_text
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
Apache-2.0
def get_error_analysis_map(output_uri: str) -> Dict[str, Any]: """Reads error analysis output and parses it into a dictionary. Args: output_uri (str): The GCS URI to error analysis output. Returns: A dictionary with annotation_resource_name as keys and `ErrorAnalysisAnnotation` objects as values. ...
Reads error analysis output and parses it into a dictionary. Args: output_uri (str): The GCS URI to error analysis output. Returns: A dictionary with annotation_resource_name as keys and `ErrorAnalysisAnnotation` objects as values.
get_error_analysis_map
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
Apache-2.0
def build_evaluated_annotation( json_object: Dict[str, Any] ) -> EvaluatedAnnotation: """Parses an EvaluatedAnnotation from a JSON dictionary.""" ea = EvaluatedAnnotation() ea.type_ = json_object['type'] ea.evaluated_data_item_view_id = json_object['evaluated_data_item_view_id'] ea.predictions.extend(json...
Parses an EvaluatedAnnotation from a JSON dictionary.
build_evaluated_annotation
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
Apache-2.0
def get_evaluated_annotations_by_slice_map( output_uri: str, slice_value_to_resource_name: Dict[str, str], error_analysis: Optional[Dict[str, Any]] = None, ) -> Dict[str, Any]: """Returns a dictionary evaluated_annotations_by_slice. Args: output_uri: The GCS URI to evaluated annotation output. ...
Returns a dictionary evaluated_annotations_by_slice. Args: output_uri: The GCS URI to evaluated annotation output. slice_value_to_resource_name: Slice values to slice resource names map. error_analysis: Error Analysis dictionary. Returns: A dictionary of evaluated annotations indexed by slice valu...
get_evaluated_annotations_by_slice_map
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_evaluated_annotation.py
Apache-2.0
def read_metrics_from_file( metrics_file_path: str, problem_type: str ) -> Tuple[Dict[str, Any], Optional[List[Dict[str, Any]]]]: """Reads the metrics and sliced metrics from gcs file. Args: metrics_file_path: The gcs file with holds the metrics. problem_type: The problem type of the metrics. Re...
Reads the metrics and sliced metrics from gcs file. Args: metrics_file_path: The gcs file with holds the metrics. problem_type: The problem type of the metrics. Returns: tuple(dict[str, Any], dict[str, Any]): a tuple of evaluation metrics and the corresponding sliced metrics.
read_metrics_from_file
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_model_evaluation.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_model_evaluation.py
Apache-2.0
def to_slice(slicing_spec: Dict[str, Any]): """Converts a VertexEvaluation OutputSlicingSpec to a Vertex AI Slice. Args: slicing_spec: VertexEvaluation OutputSlicingSpec Returns: A dictionary with keys 'dimension' and 'value'. Optionally with key 'sliceSpec'. """ value = '' if 'dimension' in...
Converts a VertexEvaluation OutputSlicingSpec to a Vertex AI Slice. Args: slicing_spec: VertexEvaluation OutputSlicingSpec Returns: A dictionary with keys 'dimension' and 'value'. Optionally with key 'sliceSpec'.
to_slice
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_model_evaluation.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/container/_implementation/model_evaluation/import_model_evaluation.py
Apache-2.0
def automl_forecasting_ensemble( project: str, location: str, root_dir: str, transform_output: Input[Artifact], metadata: Input[Artifact], tuning_result_input: Input[Artifact], instance_baseline: Input[Artifact], instance_schema_path: Input[Artifact], prediction_image_uri: str, g...
Ensembles AutoML Forecasting models. Args: project: Project to run the job in. location: Region to run the job in. root_dir: The Cloud Storage path to store the output. transform_output: The transform output artifact. metadata: The tabular example gen metadata. tuning_result_input: AutoML Tab...
automl_forecasting_ensemble
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/forecasting_ensemble.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/forecasting_ensemble.py
Apache-2.0
def automl_forecasting_stage_1_tuner( project: str, location: str, root_dir: str, num_selected_trials: int, deadline_hours: float, num_parallel_trials: int, single_run_max_secs: int, metadata: Input[Artifact], transform_output: Input[Artifact], materialized_train_split: Input[Art...
Searches AutoML Forecasting architectures and selects the top trials. Args: project: Project to run hyperparameter tuning. location: Location for running the hyperparameter tuning. root_dir: The Cloud Storage location to store the output. study_spec_parameters_override: JSON study spec. E.g.,...
automl_forecasting_stage_1_tuner
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/forecasting_stage_1_tuner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/forecasting_stage_1_tuner.py
Apache-2.0
def automl_forecasting_stage_2_tuner( project: str, location: str, root_dir: str, num_selected_trials: int, deadline_hours: float, num_parallel_trials: int, single_run_max_secs: int, metadata: Input[Artifact], transform_output: Input[Artifact], materialized_train_split: Input[Art...
Tunes AutoML Forecasting models and selects top trials. Args: project: Project to run stage 2 tuner. location: Cloud region for running the component: us-central1). root_dir: The Cloud Storage location to store the output. worker_pool_specs_override_json: JSON worker pool specs. E.g., [{"mach...
automl_forecasting_stage_2_tuner
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/forecasting_stage_2_tuner.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/forecasting_stage_2_tuner.py
Apache-2.0
def _get_base_forecasting_parameters( *, project: str, location: str, root_dir: str, target_column: str, optimization_objective: str, transformations: Dict[str, List[str]], train_budget_milli_node_hours: float, time_column: str, time_series_identifier_columns: List[str], time...
Formats a set of parameters common across Vertex forecasting pipelines.
_get_base_forecasting_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
Apache-2.0
def get_learn_to_learn_forecasting_pipeline_and_parameters( *, project: str, location: str, root_dir: str, target_column: str, optimization_objective: str, transformations: Dict[str, List[str]], train_budget_milli_node_hours: float, time_column: str, time_series_identifier_column...
Returns l2l_forecasting pipeline and formatted parameters. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. optimizatio...
get_learn_to_learn_forecasting_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
Apache-2.0
def get_time_series_dense_encoder_forecasting_pipeline_and_parameters( *, project: str, location: str, root_dir: str, target_column: str, optimization_objective: str, transformations: Dict[str, List[str]], train_budget_milli_node_hours: float, time_column: str, time_series_identi...
Returns timeseries_dense_encoder_forecasting pipeline and parameters. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. ...
get_time_series_dense_encoder_forecasting_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
Apache-2.0
def get_temporal_fusion_transformer_forecasting_pipeline_and_parameters( *, project: str, location: str, root_dir: str, target_column: str, optimization_objective: str, transformations: Dict[str, List[str]], train_budget_milli_node_hours: float, time_column: str, time_series_iden...
Returns tft_forecasting pipeline and formatted parameters. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. optimizatio...
get_temporal_fusion_transformer_forecasting_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
Apache-2.0
def get_sequence_to_sequence_forecasting_pipeline_and_parameters( *, project: str, location: str, root_dir: str, target_column: str, optimization_objective: str, transformations: Dict[str, List[str]], train_budget_milli_node_hours: float, time_column: str, time_series_identifier_...
Returns seq2seq forecasting pipeline and formatted parameters. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. optimiz...
get_sequence_to_sequence_forecasting_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/forecasting/utils.py
Apache-2.0
def automated_feature_engineering( root_dir: str, project: str, location: str, gcp_resources: dsl.OutputPath(str), materialized_data: dsl.Output[dsl.Dataset], feature_ranking: dsl.Output[dsl.Artifact], target_column: Optional[str] = '', weight_column: Optional[str] = '', data_source_...
Find the top features from the dataset.
automated_feature_engineering
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/auto_feature_engineering.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/auto_feature_engineering.py
Apache-2.0
def distillation_stage_feature_transform_engine( root_dir: str, project: str, location: str, transform_config_path: str, bigquery_train_full_table_uri: str, bigquery_validate_full_table_uri: str, target_column: str, prediction_type: str, materialized_data: dsl.Output[dsl.Dataset], ...
Feature Transform Engine (FTE) component to transform raw data to engineered features during model distilation. The FTE transform configuration is generated as part of the FTE stage prior to distillation. This distillation-stage FTE component re-uses this config to transform the input datasets with predicted ou...
distillation_stage_feature_transform_engine
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/distillation_stage_feature_transform_engine.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/distillation_stage_feature_transform_engine.py
Apache-2.0
def tabular_feature_ranking_and_selection( project: str, location: str, root_dir: str, data_source: Input[Dataset], target_column_name: str, feature_ranking: Output[Artifact], selected_features: Output[Artifact], gcp_resources: dsl.OutputPath(str), dataflow_machine_type: Optional[str...
Launches a feature selection task to pick top features. Args: project: Project to run feature selection. location: Location for running the feature selection. If not set, default to us-central1. root_dir: The Cloud Storage location to store the output. dataflow_machine_type: The machine type ...
tabular_feature_ranking_and_selection
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/feature_selection.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/feature_selection.py
Apache-2.0
def tabnet_hyperparameter_tuning_job( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, study_spec_metric_id: str, study_spec_metric_goal: str, study_spec_parameters_override: list, max_trial_count: int, parallel_trial_count: int, instance_...
Tunes TabNet hyperparameters using Vertex HyperparameterTuningJob API. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column n...
tabnet_hyperparameter_tuning_job
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/tabnet_hyperparameter_tuning_job.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/tabnet_hyperparameter_tuning_job.py
Apache-2.0
def tabnet_trainer( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, learning_rate: float, instance_baseline: Input[Artifact], metadata: Input[Artifact], materialized_train_split: Input[Artifact], materialized_eval_split: Input[Artifact], ...
Trains a TabNet model using Vertex CustomJob API. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. prediction...
tabnet_trainer
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/tabnet_trainer.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/tabnet_trainer.py
Apache-2.0
def _get_default_pipeline_params( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, optimization_objective: str, transformations: str, train_budget_milli_node_hours: float, stage_1_num_parallel_trials: Optional[int] = None, stage_2_num_parallel...
Get the AutoML Tabular v1 default training pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. prediction_type: ...
_get_default_pipeline_params
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_automl_tabular_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, optimization_objective: str, transformations: str, train_budget_milli_node_hours: float, stage_1_num_parallel_trials: Optional[int] = None, stage_...
Get the AutoML Tabular v1 default training pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. prediction_type: ...
get_automl_tabular_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_automl_tabular_feature_selection_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, optimization_objective: str, transformations: str, train_budget_milli_node_hours: float, stage_1_num_parallel_trials: Optional[int] ...
Get the AutoML Tabular v1 default training pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. prediction_type: ...
get_automl_tabular_feature_selection_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_skip_architecture_search_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, optimization_objective: str, transformations: str, train_budget_milli_node_hours: float, stage_1_tuning_result_artifact_uri: str, stage_...
Get the AutoML Tabular training pipeline that skips architecture search. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. ...
get_skip_architecture_search_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_wide_and_deep_trainer_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, learning_rate: float, dnn_learning_rate: float, transform_config: Optional[str] = None, dataset_level_custom_transformation_definitions: Option...
Get the Wide & Deep training pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. prediction_type: The type of pr...
get_wide_and_deep_trainer_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_builtin_algorithm_hyperparameter_tuning_job_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, study_spec_metric_id: str, study_spec_metric_goal: str, study_spec_parameters_override: List[Dict[str, Any]], max_trial_c...
Get the built-in algorithm HyperparameterTuningJob pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. predictio...
get_builtin_algorithm_hyperparameter_tuning_job_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_tabnet_hyperparameter_tuning_job_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, study_spec_metric_id: str, study_spec_metric_goal: str, study_spec_parameters_override: List[Dict[str, Any]], max_trial_count: int, ...
Get the TabNet HyperparameterTuningJob pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. prediction_type: The ...
get_tabnet_hyperparameter_tuning_job_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_wide_and_deep_hyperparameter_tuning_job_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, study_spec_metric_id: str, study_spec_metric_goal: str, study_spec_parameters_override: List[Dict[str, Any]], max_trial_count...
Get the Wide & Deep algorithm HyperparameterTuningJob pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. predic...
get_wide_and_deep_hyperparameter_tuning_job_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_tabnet_trainer_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, learning_rate: float, transform_config: Optional[str] = None, dataset_level_custom_transformation_definitions: Optional[ List[Dict[str, Any]] ...
Get the TabNet training pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. prediction_type: The type of predict...
get_tabnet_trainer_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_tabnet_study_spec_parameters_override( dataset_size_bucket: str, prediction_type: str, training_budget_bucket: str ) -> List[Dict[str, Any]]: """Get study_spec_parameters_override for a TabNet hyperparameter tuning job. Args: dataset_size_bucket: Size of the dataset. One of "small" (< 1M rows), ...
Get study_spec_parameters_override for a TabNet hyperparameter tuning job. Args: dataset_size_bucket: Size of the dataset. One of "small" (< 1M rows), "medium" (1M - 100M rows), or "large" (> 100M rows). prediction_type: The type of prediction the model is to produce. "classification" or "regress...
get_tabnet_study_spec_parameters_override
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_wide_and_deep_study_spec_parameters_override() -> List[Dict[str, Any]]: """Get study_spec_parameters_override for a Wide & Deep hyperparameter tuning job. Returns: List of study_spec_parameters_override. """ param_path = os.path.join( pathlib.Path(__file__).parent.resolve(), 'configs/wi...
Get study_spec_parameters_override for a Wide & Deep hyperparameter tuning job. Returns: List of study_spec_parameters_override.
get_wide_and_deep_study_spec_parameters_override
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_xgboost_study_spec_parameters_override() -> List[Dict[str, Any]]: """Get study_spec_parameters_override for an XGBoost hyperparameter tuning job. Returns: List of study_spec_parameters_override. """ param_path = os.path.join( pathlib.Path(__file__).parent.resolve(), 'configs/xgboost_params.js...
Get study_spec_parameters_override for an XGBoost hyperparameter tuning job. Returns: List of study_spec_parameters_override.
get_xgboost_study_spec_parameters_override
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_xgboost_hyperparameter_tuning_job_pipeline_and_parameters( project: str, location: str, root_dir: str, target_column: str, objective: str, study_spec_metric_id: str, study_spec_metric_goal: str, max_trial_count: int, parallel_trial_count: int, study_spec_parameters_overri...
Get the XGBoost HyperparameterTuningJob pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. objective: Specifies...
get_xgboost_hyperparameter_tuning_job_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def get_feature_selection_pipeline_and_parameters( root_dir: str, project: str, location: str, target_column: str, prediction_type: str, optimization_objective: str, dataset_level_custom_transformation_definitions: Optional[ List[Dict[str, Any]] ] = None, dataset_level_transf...
Returns feature transform engine pipeline and formatted parameters.
get_feature_selection_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/utils.py
Apache-2.0
def wide_and_deep_hyperparameter_tuning_job( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, study_spec_metric_id: str, study_spec_metric_goal: str, study_spec_parameters_override: list, max_trial_count: int, parallel_trial_count: int, in...
Tunes Wide & Deep hyperparameters using Vertex HyperparameterTuningJob API. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target col...
wide_and_deep_hyperparameter_tuning_job
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/wide_and_deep_hyperparameter_tuning_job.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/wide_and_deep_hyperparameter_tuning_job.py
Apache-2.0
def wide_and_deep_trainer( project: str, location: str, root_dir: str, target_column: str, prediction_type: str, learning_rate: float, dnn_learning_rate: float, instance_baseline: Input[Artifact], metadata: Input[Artifact], materialized_train_split: Input[Artifact], materiali...
Trains a Wide & Deep model using Vertex CustomJob API. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. root_dir: The root GCS directory for the pipeline components. target_column: The target column name. predi...
wide_and_deep_trainer
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/wide_and_deep_trainer.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/wide_and_deep_trainer.py
Apache-2.0
def xgboost_hyperparameter_tuning_job( project: str, location: str, study_spec_metric_id: str, study_spec_metric_goal: str, study_spec_parameters_override: list, max_trial_count: int, parallel_trial_count: int, worker_pool_specs: list, gcp_resources: dsl.OutputPath(str), max_fail...
Tunes XGBoost hyperparameters using Vertex HyperparameterTuningJob API. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. study_spec_metric_id: Metric to optimize. For options, please look under 'eval_metric' at https://xgb...
xgboost_hyperparameter_tuning_job
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/xgboost_hyperparameter_tuning_job.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/xgboost_hyperparameter_tuning_job.py
Apache-2.0
def xgboost_trainer( project: str, location: str, worker_pool_specs: list, gcp_resources: dsl.OutputPath(str), encryption_spec_key_name: Optional[str] = '', ): # fmt: off """Trains an XGBoost model using Vertex CustomJob API. Args: project: The GCP project that runs the pipeline compone...
Trains an XGBoost model using Vertex CustomJob API. Args: project: The GCP project that runs the pipeline components. location: The GCP region that runs the pipeline components. worker_pool_specs: The worker pool specs. encryption_spec_key_name: The KMS key name. Returns: gcp_resourc...
xgboost_trainer
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/xgboost_trainer.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/tabular/xgboost_trainer.py
Apache-2.0
def Append(self, element: _OutputType) -> None: """Appends element to the list. 1. If element is another ConcatPlaceholder, it will be flattened. 2. If seq's last element is string and element is also a string, they will be concatenated. 3. Otherwise, append directly. Args: element: El...
Appends element to the list. 1. If element is another ConcatPlaceholder, it will be flattened. 2. If seq's last element is string and element is also a string, they will be concatenated. 3. Otherwise, append directly. Args: element: Element to append to the list.
Append
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/vision/json_utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/vision/json_utils.py
Apache-2.0
def _DictEntry( key: _InputType, value: _InputType, is_first_item: bool ) -> placeholders.Placeholder: """Converts key, value to a placeholder that will evaluate to the JSON entry.""" if isinstance(key, placeholders.Placeholder): raise ValueError('Placeholders are not supported as dictionary key.') key_ob...
Converts key, value to a placeholder that will evaluate to the JSON entry.
_DictEntry
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/vision/json_utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/vision/json_utils.py
Apache-2.0
def Concat(*args: _InputType) -> placeholders.ConcatPlaceholder: """Concats args by comma and returns the constructed ConcatPlaceholder.""" ret = _SmartConcatList() is_first_item = True for el in args: obj = Json(el) if is_first_item: is_first_item = False elif isinstance(obj, placeholders.IfP...
Concats args by comma and returns the constructed ConcatPlaceholder.
Concat
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/vision/json_utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/vision/json_utils.py
Apache-2.0
def Json(obj: _InputType) -> _OutputType: """Converts obj to a placeholder that will evaluate to the JSON string.""" if ( isinstance(obj, str) or isinstance(obj, int) or isinstance(obj, float) or isinstance(obj, bool) ): return json.dumps(obj) if isinstance(obj, placeholders.Placehol...
Converts obj to a placeholder that will evaluate to the JSON string.
Json
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/automl/vision/json_utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/automl/vision/json_utils.py
Apache-2.0
def _replace_executor_placeholder( container_input: List[str], ) -> List[str]: """Replace executor placeholder in container command or args. Args: container_input: Container command or args. Returns: container_input with executor placeholder replaced. """ # Executor replacement is used as executor c...
Replace executor placeholder in container command or args. Args: container_input: Container command or args. Returns: container_input with executor placeholder replaced.
_replace_executor_placeholder
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/custom_job/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/custom_job/utils.py
Apache-2.0
def infer_pipeline( large_model_reference: str, prompt_dataset: str, model_checkpoint: Optional[str] = None, prompt_sequence_length: int = 512, target_sequence_length: int = 64, sampling_strategy: str = 'greedy', instruction: Optional[str] = None, project: str = _placeholders.PROJECT_ID_...
Uses a large-language model to perform bulk inference on a prompt dataset. Args: large_model_reference: Name of the base model. Supported values are `text-bison@001`, `t5-small`, `t5-large`, `t5-xl` and `t5-xxl`. `text-bison@001` and `t5-small` are supported in `us-central1` and `europe-west4`. `t5-large`, `t5-x...
infer_pipeline
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/llm/infer/component.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/llm/infer/component.py
Apache-2.0
def rlaif_pipeline( prompt_dataset: str, preference_prompt_dataset: str, large_model_reference: str, task_type: str, model_display_name: Optional[str] = None, prompt_sequence_length: int = 512, target_sequence_length: int = 64, large_model_a_reference: str = 'text-bison@001', large_m...
Performs reinforcement learning from AI feedback. At the moment, it only supports summarization task type. Args: prompt_dataset: Cloud storage path to an unlabled JSONL dataset that contains prompts. Text datasets must contain an `input_text` field that contains the prompt. Chat datasets must contain at least...
rlaif_pipeline
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/llm/rlaif/component.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/llm/rlaif/component.py
Apache-2.0
def rlhf_pipeline( prompt_dataset: str, preference_dataset: str, large_model_reference: str, model_display_name: Optional[str] = None, prompt_sequence_length: int = 512, target_sequence_length: int = 64, reward_model_learning_rate_multiplier: float = 1.0, reinforcement_learning_rate_mult...
Performs reinforcement learning from human feedback. Args: prompt_dataset: Cloud storage path to an unlabled JSONL dataset that contains prompts. Text datasets must contain an `input_text` field that contains the prompt. Chat datasets must contain at least 1 message in a `messages` field. Each message must be va...
rlhf_pipeline
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/llm/rlhf/component.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/llm/rlhf/component.py
Apache-2.0
def model_evaluation_import( model: Input[VertexModel], gcp_resources: dsl.OutputPath(str), evaluation_resource_name: dsl.OutputPath(str), metrics: Optional[Input[Metrics]] = None, row_based_metrics: Optional[Input[Metrics]] = None, problem_type: Optional[str] = None, classification_metrics:...
Imports a model evaluation artifact to an existing Vertex model with ModelService.ImportModelEvaluation. For more details, see https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models.evaluations One of the metrics inputs must be provided, metrics & problem_type, classification_met...
model_evaluation_import
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/model_evaluation/model_evaluation_import_component.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/model_evaluation/model_evaluation_import_component.py
Apache-2.0
def create_slice_specs_list( list_of_feature_and_value: List[ Dict[str, Union[float, int, str, List[float], bool]] ] ) -> List[ModelEvaluationSlice.Slice.SliceSpec]: """Creates a list of ModelEvaluationSlice.Slice.SliceSpec from a list of dictionary inputs. Args: list_of_feature_and_value: A li...
Creates a list of ModelEvaluationSlice.Slice.SliceSpec from a list of dictionary inputs. Args: list_of_feature_and_value: A list of feature_and_value. Each feature_and_value is a dictionary of feature names to values. The feature value can be a float, int, or str for ModelEvaluationSlice.Slice....
create_slice_specs_list
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/model_evaluation/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/model_evaluation/utils.py
Apache-2.0
def create_bias_configs_list( list_of_slice_a_and_slice_b: List[ List[Dict[str, Union[float, int, str, List[float]]]] ], ) -> List[Any]: """Creates a list of BiasConfig from a list of tuple inputs. Args: list_of_slice_a_and_slice_b: A list of slice_a_and_slice_b. Each slice_a_and_slice_b ...
Creates a list of BiasConfig from a list of tuple inputs. Args: list_of_slice_a_and_slice_b: A list of slice_a_and_slice_b. Each slice_a_and_slice_b is a list which contains 1 or two elelments. Each element in the list is a dictionary of feature names to values that represents the slice config ...
create_bias_configs_list
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/model_evaluation/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/model_evaluation/utils.py
Apache-2.0
def starry_net( # pylint: disable=dangerous-default-value tensorboard_instance_id: str, dataprep_backcast_length: int, dataprep_forecast_length: int, dataprep_train_end_date: str, dataprep_n_val_windows: int, dataprep_n_test_windows: int, dataprep_test_set_stride: int, dataprep_test_set...
Starry Net is a state-of-the-art forecaster used internally by Google. Starry Net is a glass-box neural network inspired by statistical time series models, capable of cleaning step changes and spikes, modeling seasonality and events, forecasting trend, and providing both point and prediction interval forecasts...
starry_net
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/preview/starry_net/component.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/preview/starry_net/component.py
Apache-2.0
def create( cls, name: str, uri: str, model_resource_name: str, ) -> 'VertexModel': # fmt: off """Create a VertexModel artifact instance. Args: name: The artifact name. uri: the Vertex Model resource uri, in a form of https://{service-endpoint}/v1/projects/{project}/lo...
Create a VertexModel artifact instance. Args: name: The artifact name. uri: the Vertex Model resource uri, in a form of https://{service-endpoint}/v1/projects/{project}/locations/{location}/models/{model}, where {service-endpoint} is one of the supported service endpoints at https://cloud.google.com/ve...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, name: str, uri: str, endpoint_resource_name: str, ) -> 'VertexEndpoint': # fmt: off """Create a VertexEndpoint artifact instance. Args: name: The artifact name. uri: the Vertex Endpoint resource uri, in a form of https://{service-endpoint}/v1/projects/...
Create a VertexEndpoint artifact instance. Args: name: The artifact name. uri: the Vertex Endpoint resource uri, in a form of https://{service-endpoint}/v1/projects/{project}/locations/{location}/endpoints/{endpoint}, where {service-endpoint} is one of the supported service endpoints at https://cloud.g...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, name: str, uri: str, job_resource_name: str, bigquery_output_table: Optional[str] = None, bigquery_output_dataset: Optional[str] = None, gcs_output_directory: Optional[str] = None, ) -> 'VertexBatchPredictionJob': # fmt: off """Create a VertexBatchPre...
Create a VertexBatchPredictionJob artifact instance. Args: name: The artifact name. uri: the Vertex Batch Prediction resource uri, in a form of https://{service-endpoint}/v1/projects/{project}/locations/{location}/batchPredictionJobs/{batchPredictionJob}, where {service-endpoint} is one of the supporte...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, name: str, uri: str, dataset_resource_name: str, ) -> 'VertexDataset': # fmt: off """Create a VertexDataset artifact instance. Args: name: The artifact name. uri: the Vertex Dataset resource uri, in a form of https://{service-endpoint}/v1/projects/{pro...
Create a VertexDataset artifact instance. Args: name: The artifact name. uri: the Vertex Dataset resource uri, in a form of https://{service-endpoint}/v1/projects/{project}/locations/{location}/datasets/{datasets_name}, where {service-endpoint} is one of the supported service endpoints at https://cloud...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, name: str, project_id: str, dataset_id: str, model_id: str, ) -> 'BQMLModel': # fmt: off """Create a BQMLModel artifact instance. Args: name: The artifact name. project_id: The ID of the project containing this model. dataset_id: The ID of ...
Create a BQMLModel artifact instance. Args: name: The artifact name. project_id: The ID of the project containing this model. dataset_id: The ID of the dataset containing this model. model_id: The ID of the model. For more details, see https://cloud.google.com/bigquery/docs/reference/rest/v...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, name: str, project_id: str, dataset_id: str, table_id: str, ) -> 'BQTable': # fmt: off """Create a BQTable artifact instance. Args: name: The artifact name. project_id: The ID of the project containing this table. dataset_id: The ID of the ...
Create a BQTable artifact instance. Args: name: The artifact name. project_id: The ID of the project containing this table. dataset_id: The ID of the dataset containing this table. table_id: The ID of the table. For more details, see https://cloud.google.com/bigquery/docs/reference/rest/v2...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, predict_schemata: Dict[str, str], container_spec: Dict[str, Any], ) -> 'UnmanagedContainerModel': # fmt: off """Create a UnmanagedContainerModel artifact instance. Args: predict_schemata: Contains the schemata used in Model's predictions and explanations via Predi...
Create a UnmanagedContainerModel artifact instance. Args: predict_schemata: Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. For more details, see https://cloud.google.com/vertex-ai/docs/reference/rest/v1/Predi...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, name: str = 'evaluation_metrics', recall: Optional[float] = None, precision: Optional[float] = None, f1_score: Optional[float] = None, accuracy: Optional[float] = None, au_prc: Optional[float] = None, au_roc: Optional[float] = None, log_loss: Option...
Create a ClassificationMetrics artifact instance. Args: name: The artifact name. recall: Recall (True Positive Rate) for the given confidence threshold. precision: Precision for the given confidence threshold. f1_score: The harmonic mean of recall and precision. accuracy: Accuracy is ...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, name: str = 'evaluation_metrics', root_mean_squared_error: Optional[float] = None, mean_absolute_error: Optional[float] = None, mean_absolute_percentage_error: Optional[float] = None, r_squared: Optional[float] = None, root_mean_squared_log_error: Optional[floa...
Create a RegressionMetrics artifact instance. Args: name: The artifact name. root_mean_squared_error: Root Mean Squared Error (RMSE). mean_absolute_error: Mean Absolute Error (MAE). mean_absolute_percentage_error: Mean absolute percentage error. r_squared: Coefficient of determination...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def create( cls, name: str = 'evaluation_metrics', root_mean_squared_error: Optional[float] = None, mean_absolute_error: Optional[float] = None, mean_absolute_percentage_error: Optional[float] = None, r_squared: Optional[float] = None, root_mean_squared_log_error: Optional[floa...
Create a ForecastingMetrics artifact instance. Args: name: The artifact name. root_mean_squared_error: Root Mean Squared Error (RMSE). mean_absolute_error: Mean Absolute Error (MAE). mean_absolute_percentage_error: Mean absolute percentage error. r_squared: Coefficient of determinatio...
create
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py
Apache-2.0
def prophet_trainer( project: str, location: str, root_dir: str, target_column: str, time_column: str, time_series_identifier_column: str, forecast_horizon: int, window_column: str, data_granularity_unit: str, predefined_split_column: str, source_bigquery_uri: str, gcp_re...
Trains and tunes one Prophet model per time series using Dataflow. Args: project: The GCP project that runs the pipeline components. location: The GCP region for Vertex AI. root_dir: The Cloud Storage location to store the output. time_column: Name of the column that identifies time order in ...
prophet_trainer
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/prophet_trainer.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/prophet_trainer.py
Apache-2.0
def get_bqml_arima_train_pipeline_and_parameters( project: str, location: str, root_dir: str, time_column: str, time_series_identifier_column: str, target_column: str, forecast_horizon: int, data_granularity_unit: str, predefined_split_key: str = '', timestamp_split_key: str = ''...
Get the BQML ARIMA_PLUS training pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region for Vertex AI. root_dir: The Cloud Storage location to store the output. time_column: Name of the column that identifies time order in the time series. time_series...
get_bqml_arima_train_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/utils.py
Apache-2.0
def get_bqml_arima_predict_pipeline_and_parameters( project: str, location: str, model_name: str, data_source_csv_filenames: str = '', data_source_bigquery_table_path: str = '', bigquery_destination_uri: str = '', generate_explanation: bool = False, ) -> Tuple[str, Dict[str, Any]]: # fmt: ...
Get the BQML ARIMA_PLUS prediction pipeline. Args: project: The GCP project that runs the pipeline components. location: The GCP region for Vertex AI. model_name: ARIMA_PLUS BQML model URI. data_source_csv_filenames: A string that represents a list of comma separated CSV filenames. data_source_bi...
get_bqml_arima_predict_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/utils.py
Apache-2.0
def get_prophet_train_pipeline_and_parameters( project: str, location: str, root_dir: str, time_column: str, time_series_identifier_column: str, target_column: str, forecast_horizon: int, optimization_objective: str, data_granularity_unit: str, predefined_split_key: str = '', ...
Returns Prophet train pipeline and formatted parameters. Args: project: The GCP project that runs the pipeline components. location: The GCP region for Vertex AI. root_dir: The Cloud Storage location to store the output. time_column: Name of the column that identifies time order in the time series. ...
get_prophet_train_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/utils.py
Apache-2.0
def get_prophet_prediction_pipeline_and_parameters( project: str, location: str, model_name: str, time_column: str, time_series_identifier_column: str, target_column: str, data_source_csv_filenames: str = '', data_source_bigquery_table_path: str = '', bigquery_destination_uri: str = ...
Returns Prophet prediction pipeline and formatted parameters. Unlike the prediction server for Vertex Forecasting, the Prophet prediction server returns predictions batched by time series id. This pipeline shows how these predictions can be disaggregated to get results similar to what Vertex Forecasting provid...
get_prophet_prediction_pipeline_and_parameters
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/utils.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/forecasting/utils.py
Apache-2.0
def automl_tabular_cv_trainer( project: str, location: str, root_dir: str, deadline_hours: float, num_parallel_trials: int, single_run_max_secs: int, num_selected_trials: int, transform_output: Input[Artifact], metadata: Input[Artifact], materialized_cv_splits: Input[Artifact], ...
Tunes AutoML Tabular models and selects top trials using cross-validation. Args: project: Project to run Cross-validation trainer. location: Location for running the Cross-validation trainer. root_dir: The Cloud Storage location to store the output. worker_pool_specs_override_json: JSON worke...
automl_tabular_cv_trainer
python
kubeflow/pipelines
components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/cv_trainer.py
https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/cv_trainer.py
Apache-2.0