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 automl_tabular_ensemble(
project: str,
location: str,
root_dir: str,
transform_output: Input[Artifact],
metadata: Input[Artifact],
dataset_schema: Input[Artifact],
tuning_result_input: Input[Artifact],
instance_baseline: Input[Artifact],
gcp_resources: dsl.OutputPath(str),
mo... | Ensembles AutoML Tabular models.
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.
transform_output: The transform output artifact.
metadata: The tabular example ... | automl_tabular_ensemble | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/ensemble.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/ensemble.py | Apache-2.0 |
def automl_tabular_finalizer(
project: str,
location: str,
root_dir: str,
gcp_resources: dsl.OutputPath(str),
encryption_spec_key_name: Optional[str] = '',
):
# fmt: off
"""Finalizes AutoML Tabular pipelines.
Args:
project: Project to run Cross-validation trainer.
location: Locati... | Finalizes AutoML Tabular pipelines.
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.
encryption_spec_key_name: Customer-managed encryption key.
Returns:
gcp_r... | automl_tabular_finalizer | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/finalizer.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/finalizer.py | Apache-2.0 |
def automl_tabular_infra_validator(
unmanaged_container_model: Input[UnmanagedContainerModel], # pylint: disable=unused-argument
):
# fmt: off
"""Validates the trained AutoML Tabular model is a valid model.
Args:
unmanaged_container_model: google.UnmanagedContainerModel for model to be validated.
""... | Validates the trained AutoML Tabular model is a valid model.
Args:
unmanaged_container_model: google.UnmanagedContainerModel for model to be validated.
| automl_tabular_infra_validator | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/infra_validator.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/infra_validator.py | Apache-2.0 |
def split_materialized_data(
materialized_data: Input[Dataset],
materialized_train_split: Output[Artifact],
materialized_eval_split: Output[Artifact],
materialized_test_split: Output[Artifact],
):
# fmt: off
"""Splits materialized dataset into train, eval, and test data splits.
The materialized d... | Splits materialized dataset into train, eval, and test data splits.
The materialized dataset generated by the Feature Transform Engine consists of
all the splits
that were combined into the input transform dataset (i.e., train, eval, and
test splits).
This components splits the output materialized dataset in... | split_materialized_data | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/split_materialized_data.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/split_materialized_data.py | Apache-2.0 |
def automl_tabular_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[Artifac... | Searches AutoML Tabular architectures and selects the top trials.
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.
study_spec_parameters_override: JSON study spec. E.g... | automl_tabular_stage_1_tuner | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/stage_1_tuner.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/stage_1_tuner.py | Apache-2.0 |
def training_configurator_and_validator(
dataset_stats: dsl.Input[dsl.Artifact],
split_example_counts: str,
training_schema: dsl.Input[dsl.Artifact],
instance_schema: dsl.Input[dsl.Artifact],
metadata: dsl.Output[dsl.Artifact],
instance_baseline: dsl.Output[dsl.Artifact],
target_column: Opti... | Configures training and validates data and user-input configurations.
Args:
dataset_stats: Dataset stats generated by feature transform engine.
split_example_counts: JSON string of data split example counts for train, validate, and test splits.
training_schema_path: Schema of input data to the tf_m... | training_configurator_and_validator | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/training_configurator_and_validator.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/training_configurator_and_validator.py | Apache-2.0 |
def automl_tabular_transform(
project: str,
location: str,
root_dir: str,
metadata: Input[Artifact],
dataset_schema: Input[Artifact],
train_split: Input[Dataset],
eval_split: Input[Dataset],
test_split: Input[Dataset],
materialized_train_split: Output[Artifact],
materialized_eval... | Transforms raw features to engineered features.
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.
metadata: The tabular example gen metadata.
dataset_schema: The ... | automl_tabular_transform | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/transform.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/transform.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/v1/automl/tabular/utils.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/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/v1/automl/tabular/utils.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/utils.py | Apache-2.0 |
def get_skip_evaluation_pipeline_and_parameters(
project: str,
location: str,
root_dir: str,
target_column_name: str,
prediction_type: str,
optimization_objective: str,
transformations: Dict[str, Any],
split_spec: Dict[str, Any],
data_source: Dict[str, Any],
train_budget_milli_no... | Get the AutoML Tabular training pipeline that skips evaluation.
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_name: The target column name.
p... | get_skip_evaluation_pipeline_and_parameters | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/utils.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/utils.py | Apache-2.0 |
def get_default_pipeline_and_parameters(
project: str,
location: str,
root_dir: str,
target_column_name: str,
prediction_type: str,
optimization_objective: str,
transformations: Dict[str, Any],
split_spec: Dict[str, Any],
data_source: Dict[str, Any],
train_budget_milli_node_hours... | Get the AutoML Tabular 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_name: The target column name.
prediction_type... | get_default_pipeline_and_parameters | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/utils.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/utils.py | Apache-2.0 |
def get_distill_skip_evaluation_pipeline_and_parameters(
project: str,
location: str,
root_dir: str,
target_column_name: str,
prediction_type: str,
optimization_objective: str,
transformations: Dict[str, Any],
split_spec: Dict[str, Any],
data_source: Dict[str, Any],
train_budget_... | Get the AutoML Tabular training pipeline that distill and skips evaluation.
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_name: The target column... | get_distill_skip_evaluation_pipeline_and_parameters | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/utils.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/tabular/utils.py | Apache-2.0 |
def automl_text_training_job(
project: str,
display_name: str,
dataset: Input[VertexDataset],
model: Output[VertexModel],
location: Optional[str] = 'us-central1',
prediction_type: Optional[str] = 'classification',
multi_label: Optional[bool] = False,
labels: Optional[dict] = {},
trai... | Runs the training job and returns a model.
If training on a Vertex AI dataset, you can use one of the following split configurations: Data fraction splits: Any of `training_fraction_split`, `validation_fraction_split` and `test_fraction_split` may optionally be provided, they must sum to up to 1. If the provided one... | automl_text_training_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/training_job/automl_text_training_job/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/training_job/automl_text_training_job/component.py | Apache-2.0 |
def automl_video_training_job(
project: str,
display_name: str,
dataset: Input[VertexDataset],
model: Output[VertexModel],
location: Optional[str] = 'us-central1',
prediction_type: Optional[str] = 'classification',
model_type: Optional[str] = 'CLOUD',
labels: Optional[dict] = {},
tra... | Runs the AutoML Video training job and returns a model.
If training on a Vertex AI dataset, you can use one of the following split configurations: Data fraction splits: `training_fraction_split`, and `test_fraction_split` may optionally be provided, they must sum to up to 1. If none of the fractions are set, by defa... | automl_video_training_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/automl/training_job/automl_video_training_job/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/automl/training_job/automl_video_training_job/component.py | Apache-2.0 |
def model_batch_predict(
job_display_name: str,
gcp_resources: OutputPath(str),
batchpredictionjob: Output[VertexBatchPredictionJob],
bigquery_output_table: Output[BQTable],
gcs_output_directory: Output[Artifact],
model: Input[VertexModel] = None,
unmanaged_container_model: Input[UnmanagedCo... | Creates a Google Cloud Vertex [BatchPredictionJob](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.batchPredictionJobs) and waits for it to complete. For more details, see [BatchPredictionJob.Create](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.batchPredictio... | model_batch_predict | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/batch_predict_job/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/batch_predict_job/component.py | Apache-2.0 |
def bigquery_create_model_job(
query: str,
model: Output[BQMLModel],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
project: str = _placeholders.PROJECT_ID_PLACEHO... | Launch a BigQuery create model job and waits for it to finish.
Args:
location: Location of the job to create the BigQuery model. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
query: SQL query text to execute. Onl... | bigquery_create_model_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/create_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/create_model/component.py | Apache-2.0 |
def bigquery_detect_anomalies_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
table_name: str = '',
query_statement: str = '',
contamination: float = -1.0,
anomaly_prob_threshold: float = 0.95,
query_par... | Launch a BigQuery detect anomalies model job and waits for it to finish.
Args:
location: Location to run the BigQuery model prediction job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model fo... | bigquery_detect_anomalies_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/detect_anomalies_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/detect_anomalies_model/component.py | Apache-2.0 |
def bigquery_drop_model_job(
model: Input[BQMLModel],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
project: str = _placeholders.PROJECT_ID_PLACEHOLDER,
):
# fmt: o... | Launch a BigQuery drop model job and waits for it to finish.
Args:
location: Location of the job to drop the BigQuery model. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model to drop.
q... | bigquery_drop_model_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/drop_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/drop_model/component.py | Apache-2.0 |
def bigquery_evaluate_model_job(
model: Input[BQMLModel],
evaluation_metrics: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
table_name: str = '',
query_statement: str = '',
threshold: float = -1.0,
query_parameters: List[str] = [],
job_configuration... | Launch a BigQuery evaluate model job and waits for it to finish.
Args:
location: Location to run the BigQuery model evaluation job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for evalua... | bigquery_evaluate_model_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/evaluate_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/evaluate_model/component.py | Apache-2.0 |
def bigquery_explain_forecast_model_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
horizon: int = 3,
confidence_level: float = 0.95,
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str]... | Launch a BigQuery ML.EXPLAIN_FORECAST job and let you explain forecast an
ARIMA_PLUS or ARIMA model.
This function only applies to the time-series ARIMA_PLUS and ARIMA models.
Args:
location: Location to run the BigQuery job. If not set, default to `US` multi-region. For more details, see https://cloud.goog... | bigquery_explain_forecast_model_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/explain_forecast_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/explain_forecast_model/component.py | Apache-2.0 |
def bigquery_explain_predict_model_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
table_name: str = '',
query_statement: str = '',
top_k_features: int = -1,
threshold: float = -1.0,
num_integral_steps: ... | Launch a BigQuery explain predict model job and waits for it to finish.
Args:
location: Location to run the BigQuery model prediction job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for... | bigquery_explain_predict_model_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/explain_predict_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/explain_predict_model/component.py | Apache-2.0 |
def bigquery_export_model_job(
model: Input[BQMLModel],
model_destination_path: str,
exported_model_path: OutputPath(str),
gcp_resources: OutputPath(str),
location: str = 'us-central1',
job_configuration_extract: Dict[str, str] = {},
labels: Dict[str, str] = {},
project: str = _placehold... | Launch a BigQuery export model job and waits for it to finish.
Args:
location: Location of the job to export the BigQuery model. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model to export.
... | bigquery_export_model_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/export_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/export_model/component.py | Apache-2.0 |
def bigquery_ml_feature_importance_job(
model: Input[BQMLModel],
feature_importance: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
encryption_sp... | Launch a BigQuery feature importance fetching job and waits for it to
finish.
Args:
location: Location of the job to create the BigQuery model. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML mo... | bigquery_ml_feature_importance_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/feature_importance/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/feature_importance/component.py | Apache-2.0 |
def bigquery_forecast_model_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
horizon: int = 3,
confidence_level: float = 0.95,
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
... | Launch a BigQuery ML.FORECAST job and let you forecast an ARIMA_PLUS or
ARIMA model.
This function only applies to the time-series ARIMA_PLUS and ARIMA models.
Args:
location: Location to run the BigQuery job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquer... | bigquery_forecast_model_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/forecast_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/forecast_model/component.py | Apache-2.0 |
def bigquery_ml_global_explain_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
class_level_explain: bool = False,
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[... | Launch a BigQuery global explain fetching job and waits for it to finish.
Args:
location: Location of the job to create the BigQuery model. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model f... | bigquery_ml_global_explain_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/global_explain/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/global_explain/component.py | Apache-2.0 |
def bigquery_ml_advanced_weights_job(
model: Input[BQMLModel],
advanced_weights: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
project: str = _p... | Launch a BigQuery ml advanced weights job and waits for it to finish.
Args:
location: Location of the job to create the BigQuery model. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for m... | bigquery_ml_advanced_weights_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_advanced_weights/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_advanced_weights/component.py | Apache-2.0 |
def bigquery_ml_arima_coefficients(
model: Input[BQMLModel],
arima_coefficients: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
encryption_spec_k... | Launch a BigQuery ML.ARIMA_COEFFICIENTS job and let you see the ARIMA
coefficients.
This function only applies to the time-series ARIMA_PLUS and ARIMA models.
Args:
location: Location to run the BigQuery job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery... | bigquery_ml_arima_coefficients | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_arima_coefficients/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_arima_coefficients/component.py | Apache-2.0 |
def bigquery_ml_arima_evaluate_job(
model: Input[BQMLModel],
arima_evaluation_metrics: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
show_all_candidate_models: bool = False,
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
... | Launch a BigQuery ML.ARIMA_EVALUATE job and waits for it to finish.
Args:
location: Location to run the BigQuery model evaluation job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for ML.... | bigquery_ml_arima_evaluate_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_arima_evaluate/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_arima_evaluate/component.py | Apache-2.0 |
def bigquery_ml_centroids_job(
model: Input[BQMLModel],
centroids: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
standardize: bool = False,
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
... | Launch a BigQuery ML.CENTROIDS job and waits for it to finish.
Args:
location: Location to run the BigQuery ML.CENTROIDS job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for ML.CENTROIDS... | bigquery_ml_centroids_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_centroids/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_centroids/component.py | Apache-2.0 |
def bigquery_ml_confusion_matrix_job(
model: Input[BQMLModel],
confusion_matrix: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
table_name: str = '',
query_statement: str = '',
threshold: float = -1.0,
query_parameters: List[str] = [],
job_configurati... | Launch a BigQuery confusion matrix job and waits for it to finish.
Args:
location: Location to run the BigQuery confusion matrix job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for conf... | bigquery_ml_confusion_matrix_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_confusion_matrix/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_confusion_matrix/component.py | Apache-2.0 |
def bigquery_ml_feature_info_job(
model: Input[BQMLModel],
feature_info: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
project: str = _placehold... | Launch a BigQuery feature info job and waits for it to finish.
Args:
location: Location of the job to run BigQuery feature info job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for eval... | bigquery_ml_feature_info_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_feature_info/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_feature_info/component.py | Apache-2.0 |
def bigquery_ml_principal_components_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
encryption_sp... | Launch a BigQuery ML.principal_components job and waits for it to finish.
Args:
location: Location to run the BigQuery ML.principal_components job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML ... | bigquery_ml_principal_components_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_principal_components/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_principal_components/component.py | Apache-2.0 |
def bigquery_ml_principal_component_info_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
encryptio... | Launch a BigQuery ML.principal_component_info job and waits for it to
finish.
Args:
location: Location to run the BigQuery ML.principal_component_info job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: Bi... | bigquery_ml_principal_component_info_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_principal_component_info/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_principal_component_info/component.py | Apache-2.0 |
def bigquery_ml_recommend_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
table_name: str = '',
query_statement: str = '',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
... | Launch a BigQuery ML.Recommend job and waits for it to finish.
Args:
location: Location to run the BigQuery ML.Recommend job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for ML.Recoomend... | bigquery_ml_recommend_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_recommend/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_recommend/component.py | Apache-2.0 |
def bigquery_ml_reconstruction_loss_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
table_name: str = '',
query_statement: str = '',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] ... | Launch a BigQuery ml reconstruction loss job and waits for it to finish.
Args:
location: Location to run the BigQuery ml reconstruction loss job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML mo... | bigquery_ml_reconstruction_loss_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_reconstruction_loss/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_reconstruction_loss/component.py | Apache-2.0 |
def bigquery_ml_roc_curve_job(
model: Input[BQMLModel],
roc_curve: Output[BQTable],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
table_name: str = '',
query_statement: str = '',
thresholds: str = '',
query_parameters: List[str] = [],
job_configuration_query: Dict[st... | Launch a BigQuery roc curve job and waits for it to finish.
Args:
location: Location of the job to run BigQuery roc curve job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for BigQuery r... | bigquery_ml_roc_curve_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_roc_curve/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_roc_curve/component.py | Apache-2.0 |
def bigquery_ml_training_info_job(
model: Input[BQMLModel],
ml_training_info: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
project: str = _plac... | Launch a BigQuery ml training info fetching job and waits for it to
finish.
Args:
location: Location of the job to create the BigQuery model. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
query: SQL query text ... | bigquery_ml_training_info_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_training_info/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_training_info/component.py | Apache-2.0 |
def bigquery_ml_trial_info_job(
model: Input[BQMLModel],
trial_info: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
encryption_spec_key_name: str... | Launch a BigQuery ml trial info job and waits for it to finish.
Args:
location: Location to run the BigQuery ml trial info job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model. For more deta... | bigquery_ml_trial_info_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_trial_info/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_trial_info/component.py | Apache-2.0 |
def bigquery_ml_weights_job(
model: Input[BQMLModel],
weights: Output[Artifact],
gcp_resources: OutputPath(str),
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
project: str = _placeholders.PROJEC... | Launch a BigQuery ml weights job and waits for it to finish.
Args:
location: Location of the job to create the BigQuery model. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
query: SQL query text to execute. Only ... | bigquery_ml_weights_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_weights/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/ml_weights/component.py | Apache-2.0 |
def bigquery_predict_model_job(
model: Input[BQMLModel],
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
table_name: str = '',
query_statement: str = '',
threshold: float = -1.0,
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_qu... | Launch a BigQuery predict model job and waits for it to finish.
Args:
location: Location to run the BigQuery model prediction job. If not set, default to `US` multi-region. For more details, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location
model: BigQuery ML model for predict... | bigquery_predict_model_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/predict_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/predict_model/component.py | Apache-2.0 |
def bigquery_query_job(
destination_table: Output[BQTable],
gcp_resources: OutputPath(str),
query: str = '',
location: str = 'us-central1',
query_parameters: List[str] = [],
job_configuration_query: Dict[str, str] = {},
labels: Dict[str, str] = {},
encryption_spec_key_name: str = '',
... | Launch a BigQuery query job and waits for it to finish.
Note: The total input commands/args to the component can be at most 50KB. This means the BigQuery query must be less than 50KB, since the input commands/args contain other non-query characters, including all parameter names, parameter values, and various JSON c... | bigquery_query_job | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/bigquery/query_job/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/bigquery/query_job/component.py | Apache-2.0 |
def dataflow_flex_template(
container_spec_gcs_path: str,
gcp_resources: OutputPath(str),
location: str = 'us-central1',
job_name: str = '',
parameters: Dict[str, str] = {},
launch_options: Dict[str, str] = {},
num_workers: int = 0,
max_workers: int = 0,
service_account_email: str = ... | Launch a job with a Dataflow Flex Template.
Args:
location: The regional endpoint to which to direct the request. E.g., us-central1, us-west1. Defaults to `us-central1` if not set.
job_name: The job name to use for the created job. For update job requests, the job name should be the same as the existing runn... | dataflow_flex_template | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataflow/flex_template/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataflow/flex_template/component.py | Apache-2.0 |
def dataflow_python(
python_module_path: str,
temp_location: str,
gcp_resources: OutputPath(str),
location: str = 'us-central1',
requirements_file_path: str = '',
args: List[str] = [],
project: str = _placeholders.PROJECT_ID_PLACEHOLDER,
):
# fmt: off
"""Launch a self-executing Beam Pyth... | Launch a self-executing Beam Python file on Google Cloud using the
Dataflow Runner.
Args:
location: Location of the Dataflow job. If not set, defaults to `'us-central1'`.
python_module_path: The GCS path to the Python file to run.
temp_location: A GCS path for Dataflow to stage temporary job file... | dataflow_python | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataflow/python_job/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataflow/python_job/component.py | Apache-2.0 |
def dataproc_create_pyspark_batch(
main_python_file_uri: str,
gcp_resources: OutputPath(str),
location: str = 'us-central1',
batch_id: str = '',
labels: Dict[str, str] = {},
container_image: str = '',
runtime_config_version: str = '',
runtime_config_properties: Dict[str, str] = {},
s... | Create a Dataproc PySpark batch workload and wait for it to finish.
Args:
location: Location of the Dataproc batch workload. If not set, defaults to `"us-central1"`.
batch_id: The ID to use for the batch, which will become the final component of the batch's resource name. If none is specified, a default ... | dataproc_create_pyspark_batch | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataproc/create_pyspark_batch/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataproc/create_pyspark_batch/component.py | Apache-2.0 |
def dataproc_create_spark_batch(
gcp_resources: OutputPath(str),
location: str = 'us-central1',
batch_id: str = '',
labels: Dict[str, str] = {},
container_image: str = '',
runtime_config_version: str = '',
runtime_config_properties: Dict[str, str] = {},
service_account: str = '',
net... | Create a Dataproc Spark batch workload and wait for it to finish.
Args:
location: Location of the Dataproc batch workload. If not set, defaults to `"us-central1"`.
batch_id: The ID to use for the batch, which will become the final component of the batch's resource name. If none is specified, a default na... | dataproc_create_spark_batch | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataproc/create_spark_batch/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataproc/create_spark_batch/component.py | Apache-2.0 |
def dataproc_create_spark_r_batch(
gcp_resources: OutputPath(str),
location: str = 'us-central1',
batch_id: str = '',
labels: Dict[str, str] = {},
container_image: str = '',
runtime_config_version: str = '',
runtime_config_properties: Dict[str, str] = {},
service_account: str = '',
n... | Create a Dataproc SparkR batch workload and wait for it to finish.
Args:
location: Location of the Dataproc batch workload. If not set, defaults to `"us-central1"`.
batch_id: The ID to use for the batch, which will become the final component of the batch's resource name. If none is specified, a default n... | dataproc_create_spark_r_batch | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataproc/create_spark_r_batch/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataproc/create_spark_r_batch/component.py | Apache-2.0 |
def dataproc_create_spark_sql_batch(
gcp_resources: OutputPath(str),
location: str = 'us-central1',
batch_id: str = '',
labels: Dict[str, str] = {},
container_image: str = '',
runtime_config_version: str = '',
runtime_config_properties: Dict[str, str] = {},
service_account: str = '',
... | Create a Dataproc Spark SQL batch workload and wait for it to finish.
Args:
location: Location of the Dataproc batch workload. If not set, defaults to `"us-central1"`.
batch_id: The ID to use for the batch, which will become the final component of the batch's resource name. If none is specified, a defaul... | dataproc_create_spark_sql_batch | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataproc/create_spark_sql_batch/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataproc/create_spark_sql_batch/component.py | Apache-2.0 |
def image_dataset_create(
display_name: str,
dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
data_item_labels: Optional[Dict[str, str]] = {},
gcs_source: Optional[str] = None,
import_schema_uri: Optional[str] = None,
labels: Optional[Dict[str, str]] = {},
encrypt... | Creates a new image [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets) and optionally imports data into Dataset when `source` and `import_schema_uri` are passed.
Args:
display_name: The user-defined name of the Dataset. The name can be up to 128 characters long and... | image_dataset_create | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_image_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_image_dataset/component.py | Apache-2.0 |
def tabular_dataset_create(
display_name: str,
dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
gcs_source: Optional[str] = None,
bq_source: Optional[str] = None,
labels: Optional[dict] = {},
encryption_spec_key_name: Optional[str] = None,
project: str = _placehol... | Creates a new tabular [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets).
Args:
display_name: The user-defined name of the Dataset. The name can be up to 128 characters long and can be consist of any UTF-8 characters.
gcs_source: Google Cloud Storage URI(-s) ... | tabular_dataset_create | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_tabular_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_tabular_dataset/component.py | Apache-2.0 |
def text_dataset_create(
display_name: str,
dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
data_item_labels: Optional[dict] = {},
gcs_source: Optional[str] = None,
import_schema_uri: Optional[str] = None,
labels: Optional[dict] = {},
encryption_spec_key_name: Op... | Creates a new text [Dataset](https://cloud.google.com/vertex-
ai/docs/reference/rest/v1/projects.locations.datasets) and optionally imports
data into Dataset when `source` and `import_schema_uri` are passed.
Args:
display_name: The user-defined name of the Dataset. The name can be up to 128 characters long... | text_dataset_create | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_text_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_text_dataset/component.py | Apache-2.0 |
def time_series_dataset_create(
display_name: str,
dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
gcs_source: Optional[str] = None,
bq_source: Optional[str] = None,
labels: Optional[dict] = {},
encryption_spec_key_name: Optional[str] = None,
project: str = _plac... | Creates a new time series [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets).
Args:
display_name: The user-defined name of the Dataset. The name can be up to 128 characters long and can be consist of any UTF-8 characters.
gcs_source: Google Cloud Storage URI(... | time_series_dataset_create | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_time_series_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_time_series_dataset/component.py | Apache-2.0 |
def video_dataset_create(
display_name: str,
dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
data_item_labels: Optional[dict] = {},
gcs_source: Optional[str] = None,
import_schema_uri: Optional[str] = None,
labels: Optional[dict] = {},
encryption_spec_key_name: O... | Creates a new video [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets) and optionally imports data into Dataset when `source` and `import_schema_uri` are passed.
Args:
display_name: The user-defined name of the Dataset. The name can be up to 128 characters long and... | video_dataset_create | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_video_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/create_video_dataset/component.py | Apache-2.0 |
def image_dataset_export(
dataset: Input[VertexDataset],
output_dir: str,
exported_dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
project: str = _placeholders.PROJECT_ID_PLACEHOLDER,
):
# fmt: off
"""Exports [Dataset](https://cloud.google.com/vertex-ai/docs/reference/re... | Exports [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets) to a GCS output directory.
Args:
output_dir: The Google Cloud Storage location where the output is to be written to. In the given directory a new directory will be created with name: `export-data-<dataset-d... | image_dataset_export | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/export_image_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/export_image_dataset/component.py | Apache-2.0 |
def time_series_dataset_export(
dataset: Input[VertexDataset],
output_dir: str,
exported_dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
project: str = _placeholders.PROJECT_ID_PLACEHOLDER,
):
# fmt: off
"""Exports [Dataset](https://cloud.google.com/vertex-ai/docs/refere... | Exports [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets) to a GCS output directory.
Args:
output_dir: The Google Cloud Storage location where the output is to be written to. In the given directory a new directory will be created with name: `export-data-<dataset-d... | time_series_dataset_export | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/export_time_series_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/export_time_series_dataset/component.py | Apache-2.0 |
def get_vertex_dataset(
dataset_resource_name: str,
dataset: Output[VertexDataset],
gcp_resources: dsl.OutputPath(str),
):
# fmt: off
"""Gets a [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets) artifact as a Vertex Dataset artifact.
Args:
dataset_res... | Gets a [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets) artifact as a Vertex Dataset artifact.
Args:
dataset_resource_name: Vertex Dataset resource name in the format of `projects/{project}/locations/{location}/datasets/{dataset}`.
Returns:
dataset: Vertex D... | get_vertex_dataset | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/get_vertex_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/get_vertex_dataset/component.py | Apache-2.0 |
def image_dataset_import(
dataset: Input[VertexDataset],
output__dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
data_item_labels: Optional[dict] = {},
gcs_source: Optional[str] = None,
import_schema_uri: Optional[str] = None,
project: str = _placeholders.PROJECT_ID_... | Uploads data to an existing managed [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets).
Args:
location: Optional location to retrieve Dataset from.
dataset: The Dataset to be updated.
gcs_source: Google Cloud Storage URI(-s) to the input file(s). May co... | image_dataset_import | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/import_image_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/import_image_dataset/component.py | Apache-2.0 |
def text_dataset_import(
dataset: Input[VertexDataset],
output__dataset: Output[VertexDataset],
location: Optional[str] = 'us-central1',
data_item_labels: Optional[dict] = {},
gcs_source: Optional[str] = None,
import_schema_uri: Optional[str] = None,
project: str = _placeholders.PROJECT_ID_P... | Uploads data to an existing managed [Dataset](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.datasets).
Args:
location: Optional location to retrieve Datasetfrom.
dataset: The Datasetto be updated.
gcs_source: Google Cloud Storage URI(-s) to the input file(s). May cont... | text_dataset_import | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/dataset/import_text_dataset/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/dataset/import_text_dataset/component.py | Apache-2.0 |
def endpoint_create(
display_name: str,
gcp_resources: OutputPath(str),
endpoint: Output[VertexEndpoint],
location: str = 'us-central1',
description: str = '',
labels: Dict[str, str] = {},
encryption_spec_key_name: str = '',
network: str = '',
project: str = _placeholders.PROJECT_ID_... | [Creates](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/create) a Google Cloud Vertex [Endpoint](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints) and waits for it to be ready. See the [Endpoint create](https://cloud.google.com/vertex-ai/doc... | endpoint_create | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/endpoint/create_endpoint/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/endpoint/create_endpoint/component.py | Apache-2.0 |
def endpoint_delete(
endpoint: Input[VertexEndpoint],
gcp_resources: dsl.OutputPath(str),
):
# fmt: off
"""[Deletes](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/delete) a Google Cloud Vertex [Endpoint](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/proje... | [Deletes](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/delete) a Google Cloud Vertex [Endpoint](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints). See the [Endpoint delete](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.... | endpoint_delete | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/endpoint/delete_endpoint/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/endpoint/delete_endpoint/component.py | Apache-2.0 |
def model_deploy(
model: Input[VertexModel],
gcp_resources: OutputPath(str),
endpoint: Input[VertexEndpoint] = None,
deployed_model_display_name: str = '',
traffic_split: Dict[str, str] = {},
dedicated_resources_machine_type: str = '',
dedicated_resources_min_replica_count: int = 0,
dedi... | [Deploys](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/deployModel) a Google Cloud Vertex Model to an [Endpoint](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints) creating a [DeployedModel](https://cloud.google.com/vertex-ai/docs/reference/... | model_deploy | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/endpoint/deploy_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/endpoint/deploy_model/component.py | Apache-2.0 |
def model_undeploy(
model: Input[VertexModel],
endpoint: Input[VertexEndpoint],
gcp_resources: OutputPath(str),
traffic_split: Dict[str, str] = {},
):
# fmt: off
"""[Undeploys](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/undeployModel) a Google Cloud Vertex... | [Undeploys](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/undeployModel) a Google Cloud Vertex [DeployedModel](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints#deployedmodel) within an [Endpoint](https://cloud.google.com/vertex-ai/docs/refer... | model_undeploy | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/endpoint/undeploy_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/endpoint/undeploy_model/component.py | Apache-2.0 |
def prepare_data_for_train(
input_tables: list,
preprocess_metadata: dict,
model_feature_columns: Optional[list] = None,
) -> NamedTuple(
'Outputs',
[
('time_series_identifier_column', str),
('time_series_attribute_columns', list),
('available_at_forecast_columns', list),
... | Prepares the parameters for the training step.
Converts the input_tables and the output of ForecastingPreprocessingOp
to the input parameters of TimeSeriesDatasetCreateOp and
AutoMLForecastingTrainingJobRunOp.
Args:
input_tables: Serialized Json array that specifies input BigQuery tables and specs.
pr... | prepare_data_for_train | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/forecasting/prepare_data_for_train/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/forecasting/prepare_data_for_train/component.py | Apache-2.0 |
def forecasting_preprocessing(
project: str,
input_tables: list,
preprocess_metadata: dsl.OutputPath(dict),
preprocessing_bigquery_dataset: Optional[str] = '',
location: Optional[str] = 'US',
):
# fmt: off
"""Preprocesses BigQuery tables for training or prediction.
Creates a BigQuery table fo... | Preprocesses BigQuery tables for training or prediction.
Creates a BigQuery table for training or prediction based on the input tables.
For training, a primary table is required. Optionally, you can include some
attribute tables. For prediction, you need to include all the tables that were
used in the training... | forecasting_preprocessing | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/forecasting/preprocess/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/forecasting/preprocess/component.py | Apache-2.0 |
def forecasting_validation(
input_tables: list,
validation_theme: str,
location: Optional[str] = 'US',
):
# fmt: off
"""Validates BigQuery tables for training or prediction.
Validates BigQuery tables for training or prediction based on predefined
requirements. For training, a primary table is requi... | Validates BigQuery tables for training or prediction.
Validates BigQuery tables for training or prediction based on predefined
requirements. For training, a primary table is required. Optionally, you
can include some attribute tables. For prediction, you need to include all
the tables that were used in the tra... | forecasting_validation | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/forecasting/validate/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/forecasting/validate/component.py | Apache-2.0 |
def serialize_parameters(
parameters: Dict[str, hyperparameter_tuning._ParameterSpec]
) -> List[Dict[str, Any]]:
# fmt: off
"""Utility for converting a hyperparameter tuning [ParameterSpec](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/StudySpec#ParameterSpec) into a list of dictionaries.
Args:
... | Utility for converting a hyperparameter tuning [ParameterSpec](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/StudySpec#ParameterSpec) into a list of dictionaries.
Args:
parameters (Dict[str, hyperparameter_tuning._ParameterSpec]): Dictionary of parameter ids to subclasses of [_ParameterSpec](https://... | serialize_parameters | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/hyperparameter_tuning_job/utils.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/hyperparameter_tuning_job/utils.py | Apache-2.0 |
def serialize_metrics(metric_spec: Dict[str, str]) -> List[Dict[str, Any]]:
# fmt: off
"""Utility for converting a hyperparameter tuning [MetricSpec](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/StudySpec#metricspec) into a list of dictionaries.
Args:
metric_spec (Dict[str, str]): Dictionary rep... | Utility for converting a hyperparameter tuning [MetricSpec](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/StudySpec#metricspec) into a list of dictionaries.
Args:
metric_spec (Dict[str, str]): Dictionary representing metrics to optimize. The dictionary key is the metric_id, which is reported by your ... | serialize_metrics | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/hyperparameter_tuning_job/utils.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/hyperparameter_tuning_job/utils.py | Apache-2.0 |
def model_delete(model: Input[VertexModel], gcp_resources: dsl.OutputPath(str)):
# fmt: off
"""[Deletes](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models/delete) a Google Cloud Vertex [Model](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models). See... | [Deletes](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models/delete) a Google Cloud Vertex [Model](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models). See the [Model delete](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.mo... | model_delete | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/model/delete_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/model/delete_model/component.py | Apache-2.0 |
def model_export(
model: Input[VertexModel],
export_format_id: str,
output_info: OutputPath(Dict[str, str]),
gcp_resources: OutputPath(str),
artifact_destination: str = '',
image_destination: str = '',
):
# fmt: off
"""[Exports](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/proje... | [Exports](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models/export) a Google Cloud Vertex [Model](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models) to a user-specified location. The Model must be exportable. A Model is considered to be exportable if i... | model_export | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/model/export_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/model/export_model/component.py | Apache-2.0 |
def model_get(
model: dsl.Output[VertexModel],
model_name: str,
project: str = _placeholders.PROJECT_ID_PLACEHOLDER,
location: str = 'us-central1',
):
# fmt: off
"""Gets a model artifact based on the model name of an existing Vertex model.
Args:
project: Project from which to get the VertexMo... | Gets a model artifact based on the model name of an existing Vertex model.
Args:
project: Project from which to get the VertexModel. Defaults to the project in which the PipelineJob is run.
model_name: Specify the model name in one of the following formats: {model}: Fetches the default model version. {model}... | model_get | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/model/get_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/model/get_model/component.py | Apache-2.0 |
def model_upload(
display_name: str,
gcp_resources: OutputPath(str),
model: Output[VertexModel],
location: str = 'us-central1',
description: str = '',
parent_model: Input[VertexModel] = None,
unmanaged_container_model: Input[UnmanagedContainerModel] = None,
explanation_metadata: Dict[str... | [Uploads](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models/upload) a Google Cloud Vertex [Model](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models) and returns a Model artifact representing the uploaded Model resource, with a tag for the particular ve... | model_upload | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/model/upload_model/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/model/upload_model/component.py | Apache-2.0 |
def vision_model_error_analysis_pipeline( # pylint: disable=dangerous-default-value
location: str,
model_name: str,
batch_predict_gcs_destination_output_uri: str,
test_dataset_resource_name: str = '',
test_dataset_annotation_set_name: str = '',
training_dataset_resource_name: str = '',
trai... | The evaluation vision error analysis pipeline.
This pipeline can help you to continuously discover dataset example errors
with nearest neighbor distances and outlier flags, and provides you with
actionable steps to improve the model performance. It uses GCP services
including Dataflow and BatchPrediction.
A... | vision_model_error_analysis_pipeline | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/error_analysis_pipeline.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/error_analysis_pipeline.py | Apache-2.0 |
def evaluated_annotation_pipeline( # pylint: disable=dangerous-default-value
location: str,
model_name: str,
batch_predict_gcs_destination_output_uri: str,
test_dataset_resource_name: str = '',
test_dataset_annotation_set_name: str = '',
test_dataset_storage_source_uris: List[str] = [],
bat... | The evaluation evaluated annotation pipeline.
Args:
location: The GCP region that runs the pipeline components.
model_name: The Vertex model resource name to be imported and used for batch prediction, in the format of `projects/{project}/locations/{location}/models/{model}` or `projects/{project}/locations/{... | evaluated_annotation_pipeline | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/evaluated_annotation_pipeline.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/evaluated_annotation_pipeline.py | Apache-2.0 |
def autosxs_pipeline(
evaluation_dataset: str,
task: str,
id_columns: List[str],
autorater_prompt_parameters: Dict[str, Dict[str, str]],
model_a: str = '',
model_b: str = '',
model_a_prompt_parameters: Dict[str, Dict[str, str]] = {},
model_b_prompt_parameters: Dict[str, Dict[str, str]] =... | Evaluates two models side-by-side using an arbiter model.
Args:
evaluation_dataset: A BigQuery table or comma-separated list of GCS paths to a JSONL dataset containing evaluation examples.
task: Evaluation task in the form `{task}@{version}`. task can be one of `[summarization, question_answering]`. Version ... | autosxs_pipeline | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/model_based_llm_evaluation/autosxs/autosxs_pipeline.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/model_based_llm_evaluation/autosxs/autosxs_pipeline.py | Apache-2.0 |
def vertex_pipelines_notification_email(
recipients: List[str],
pipeline_task_final_status: PipelineTaskFinalStatus,
):
# fmt: off
"""Send notification email(s) when an upstream task/DAG completes.
This component can only be used as an [ExitHandler](https://www.kubeflow.org/docs/components/pipelines/v2/p... | Send notification email(s) when an upstream task/DAG completes.
This component can only be used as an [ExitHandler](https://www.kubeflow.org/docs/components/pipelines/v2/pipelines/control-flow/#exit-handling-dslexithandler)'s exit task. Note that the [PipelineTaskFinalStatus](https://kubeflow-pipelines.readthedocs.i... | vertex_pipelines_notification_email | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/vertex_notification_email/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/vertex_notification_email/component.py | Apache-2.0 |
def wait_gcp_resources(
gcp_resources: str,
output__gcp_resources: OutputPath(str),
):
# fmt: off
"""Waits for the completion of one or more GCP resources by polling for
completion statuses.
Currently this component only supports waiting on a [DataflowJob](https://cloud.google.com/config-connector/docs... | Waits for the completion of one or more GCP resources by polling for
completion statuses.
Currently this component only supports waiting on a [DataflowJob](https://cloud.google.com/config-connector/docs/reference/resource-docs/dataflow/dataflowjob) resource. To use this component, first create a component that out... | wait_gcp_resources | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/v1/wait_gcp_resources/component.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/v1/wait_gcp_resources/component.py | Apache-2.0 |
def _resolve_image() -> str:
"""Determines the image URI to create a container from."""
return os.environ.get(
'AUTOSXS_IMAGE_OVERRIDE'
) or utils.get_default_image_uri('autosxs') | Determines the image URI to create a container from. | _resolve_image | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/batch_prediction_pairwise.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/batch_prediction_pairwise.py | Apache-2.0 |
def batch_prediction_pairwise(
display_name: str,
evaluation_dataset: str,
id_columns: List[str],
task: str,
autorater_prompt_parameters: Dict[str, Dict[str, str]],
response_column_a: str,
response_column_b: str,
preprocessed_evaluation_dataset: dsl.Output[dsl.Dataset], # pylint: disabl... | Runs up to two LLM Batch Prediction jobs side-by-side.
Args:
display_name: Display name for the batch prediction job.
evaluation_dataset: GCS or BigQuery URIs representing a dataset of prompts
and responses.
id_columns: The columns which distinguish unique evaluation examples.
task: Task to eva... | batch_prediction_pairwise | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/batch_prediction_pairwise.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/batch_prediction_pairwise.py | Apache-2.0 |
def bulk_inferrer(
project: str,
location: str,
inputs_sequence_length: int,
targets_sequence_length: int,
accelerator_type: str,
accelerator_count: int,
machine_type: str,
image_uri: str,
dataset_split: str,
large_model_reference: str,
input_model: str,
input_dataset_pat... | Performs bulk inference.
Args:
project: Project used to run the job.
location: Location used to run the job.
inputs_sequence_length: Maximum encoder/prefix length. Inputs will be padded
or truncated to this length.
targets_sequence_length: Maximum decoder steps. Outputs will be at most this
... | bulk_inferrer | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/bulk_inferrer.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/bulk_inferrer.py | Apache-2.0 |
def pipeline(
output_adapter_path: str,
large_model_reference: str,
policy_model_reference: str,
model_display_name: Optional[str] = None,
deploy_model: bool = True,
upload_model: bool = True,
encryption_spec_key_name: str = '',
upload_location: str = _placeholders.LOCATION_PLACEHOLDER,
... | Uploads a tuned language model and (optionally) deploys it to an endpoint.
Args:
output_adapter_path: Path to the trained model adapter if LoRA tuning was used.
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`... | pipeline | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/deployment_graph.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/deployment_graph.py | Apache-2.0 |
def deploy_llm_model(
project: str,
location: str,
model_resource_name: str,
display_name: str,
regional_endpoint: str,
endpoint_resource_name: dsl.OutputPath(str),
create_endpoint_gcp_resources: dsl.OutputPath(str),
deploy_model_gcp_resources: dsl.OutputPath(str),
encryption_spec_ke... | Creates a vertex endpoint and deploy the specified model.
Args:
project: Name of the GCP project.
location: Location for model upload and deployment.
model_resource_name: Path to the created Model on Model Registry.
display_name: Name of the model (shown in Model Registry).
regional_end... | deploy_llm_model | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/deploy_llm_model.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/deploy_llm_model.py | Apache-2.0 |
def resolve_machine_spec(
accelerator_type: str = 'GPU',
use_test_spec: bool = False,
) -> NamedTuple(
'MachineSpec',
machine_type=str,
tuning_location=str,
accelerator_type=str,
accelerator_count=int,
):
"""Returns machine spec to use for a given accelerator_type.
Args:
accelerator... | Returns machine spec to use for a given accelerator_type.
Args:
accelerator_type: One of 'TPU' or 'GPU'. If 'TPU' is specified, tuning
components run in europe-west4. Otherwise tuning components run in
us-central1 on GPUs. Default is 'GPU'.
use_test_spec: Whether to use a lower resource machine f... | resolve_machine_spec | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def resolve_refined_image_uri(
project: str,
location: str,
artifact_registry: str,
tag: str,
accelerator_type: str = '',
use_experimental_image: bool = False,
) -> str:
"""Generates image uri based on base image name and accelerator type.
Args:
project: Project that contains the artifa... | Generates image uri based on base image name and accelerator type.
Args:
project: Project that contains the artifact registry.
location: Region that contains the artifact registry.
artifact_registry: Registry that contains Docker images.
tag: Image tag.
accelerator_type: One of the supported acce... | resolve_refined_image_uri | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def resolve_reference_model_metadata(
large_model_reference: str,
reference_model_path: Optional[str] = None,
) -> NamedTuple(
'Outputs',
large_model_reference=str,
reference_model_path=str,
reward_model_reference=str,
reward_model_path=str,
):
"""Resolves reference model metadata needed b... | Resolves reference model metadata needed by downstream components.
Args:
large_model_reference: User-provided reference model name.
reference_model_path: Optional path to a tuned based model to use in place
of the default base model. If specified, the model at this path must be a
tuned version of... | resolve_reference_model_metadata | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def resolve_model_display_name(
large_model_reference: str,
model_display_name: Optional[str] = None,
) -> str:
"""Gets the model display name shown in the registry and used for endpoints.
Args:
large_model_reference: Base model tuned by the pipeline.
model_display_name: User-provided display name.... | Gets the model display name shown in the registry and used for endpoints.
Args:
large_model_reference: Base model tuned by the pipeline.
model_display_name: User-provided display name. If not provided, a default
display name will be created.
Returns:
Either the user-provided name or a default di... | resolve_model_display_name | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def resolve_deploy_model(
deploy_model: bool, large_model_reference: str
) -> bool:
"""Resolves runtime parameter that determines whether the tuned model should be deployed."""
supported_models = {'BISON', 'BISON_002'}
if deploy_model and large_model_reference in supported_models:
return True
return Fal... | Resolves runtime parameter that determines whether the tuned model should be deployed. | resolve_deploy_model | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def value_exists(value: Optional[str] = None) -> bool:
"""Returns whether a runtime parameter was provided.
Args:
value: That might have been provided.
Returns:
Whether the string is not None and non-empty.
"""
if not value:
return False
return True | Returns whether a runtime parameter was provided.
Args:
value: That might have been provided.
Returns:
Whether the string is not None and non-empty.
| value_exists | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def resolve_upload_model(large_model_reference: str) -> bool:
"""Returns whether the model should be uploaded."""
supported_models = {'BISON', 'BISON_002'}
if large_model_reference in supported_models:
return True
return False | Returns whether the model should be uploaded. | resolve_upload_model | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def resolve_instruction(
large_model_reference: str, instruction: Optional[str] = None
) -> str:
"""Resolves the instruction to use for a given reference model.
Args:
large_model_reference: Base model tuned by the pipeline.
instruction: Instruction provided at runtime.
Returns:
Instruction to us... | Resolves the instruction to use for a given reference model.
Args:
large_model_reference: Base model tuned by the pipeline.
instruction: Instruction provided at runtime.
Returns:
Instruction to use during tokenization based on model type. Returns an empty
string for chat models because the instr... | resolve_instruction | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def resolve_num_microbatches(large_model_reference: str) -> int:
"""Resolves the number of microbatches to use during training.
Args:
large_model_reference: Base model tuned by the pipeline.
Returns:
Number of microbatches to break the total batch size into during training.
"""
if 'llama' in large_m... | Resolves the number of microbatches to use during training.
Args:
large_model_reference: Base model tuned by the pipeline.
Returns:
Number of microbatches to break the total batch size into during training.
| resolve_num_microbatches | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/function_based.py | Apache-2.0 |
def infer_preprocessor(
large_model_reference: str,
accelerator_type: str,
use_test_spec: bool,
project: str,
location: str,
artifact_registry: str,
tag: str,
gcp_resources: dsl.OutputPath(str), # pytype: disable=invalid-annotation
metadata_large_model_reference: dsl.OutputPath(str)... | Preprocess infer pipeline inputs.
Args:
large_model_reference: The model for fine tuning.
accelerator_type: Specific accelerator type for the job.
use_test_spec: Whether to use a lower resource machine for testing.
project: Project that contains the artifact registry.
location: Region that contai... | infer_preprocessor | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/infer_preprocessor.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/infer_preprocessor.py | Apache-2.0 |
def model_evaluation_text_generation_pairwise(
judgments_dir: str,
autosxs_metrics: dsl.Output[dsl.Metrics], # pylint: disable=unused-argument # pytype: disable=unsupported-operands
gcp_resources: dsl.OutputPath(str), # pytype: disable=invalid-annotation
model_a_evaluation_path: dsl.OutputPath(str), ... | Compute AutoSXS metrics using judgments outputs from Arbiter.
Args:
judgments_dir: Path to store the Judgments.
human_preference_column: The column containing ground truths. The default
value is an empty string if not be provided by users.
project: Project to upload evaluation metrics to.
locat... | model_evaluation_text_generation_pairwise | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/model_evaluation_text_generation_pairwise.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/model_evaluation_text_generation_pairwise.py | Apache-2.0 |
def online_evaluation_pairwise(
inference_output_uri: str,
id_columns: List[str],
task: str,
judgments: dsl.Output[dsl.Dataset], # pylint: disable=unused-argument # pytype: disable=unsupported-operands
judgments_uri: dsl.OutputPath(str), # pytype: disable=invalid-annotation
error_messages: dsl... | Evaluate two models using an autorater.
Args:
inference_output_uri: Directory of model A's inference output.
id_columns: The columns which distinguish unique evaluation examples.
human_preference_column: Human preference column included in our inference
output.
task: Evaluation task in the form... | online_evaluation_pairwise | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/online_evaluation_pairwise.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/online_evaluation_pairwise.py | Apache-2.0 |
def format_preference_input_data(
model_a_inference_dir_uri: str,
model_b_inference_dir_uri: str,
instruction: str,
) -> str:
"""Format the inference data from model a and model b and merge them as the input for auto sxs evaluation.
Args:
model_a_inference_dir_uri: Where the model a judgments data ... | Format the inference data from model a and model b and merge them as the input for auto sxs evaluation.
Args:
model_a_inference_dir_uri: Where the model a judgments data was saved in the
previous step.
model_b_inference_dir_uri: Where the model b judgments data was saved in the
previous step.
... | format_preference_input_data | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preference_data_formatter.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preference_data_formatter.py | Apache-2.0 |
def format_preference_data(input_uri: str) -> str:
"""Format the input for preference data.
Args:
input_uri: Where the judgments data was saved in the previous step.
Returns:
The path to the new output file that saved the formatted preference data.
It's under the same folder as the original data fil... | Format the input for preference data.
Args:
input_uri: Where the judgments data was saved in the previous step.
Returns:
The path to the new output file that saved the formatted preference data.
It's under the same folder as the original data file.
| format_preference_data | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preference_data_formatter.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preference_data_formatter.py | Apache-2.0 |
def preprocess_chat_dataset(
large_model_reference: str,
input_dataset_uri: str,
dataset_type: str,
processed_dataset: dsl.OutputPath(dsl.Artifact), # pytype: disable=invalid-annotation
processed_dataset_uri: dsl.OutputPath(str), # pytype: disable=invalid-annotation
default_context: str = '',
... | Preprocesses datasets before tokenization.
For text datasets, this is a no-op.
Args:
large_model_reference: Name of the base model. Supported values are `text-bison@001`, `chat-bison@001`, `t5-small`, `t5-large`, `t5-xl` and `t5-xxl`. `text-bison@001`, `chat-bison@001` and `t5-small` are supported in ``us-cen... | preprocess_chat_dataset | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preprocess_chat_dataset.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preprocess_chat_dataset.py | Apache-2.0 |
def get_gcs_path(input_path: str, allow_local_files: bool) -> str:
"""Gets the /gcs/ path for a given URI."""
if input_path.startswith('gs://'):
return input_path.replace('gs://', '/gcs/', 1)
elif input_path.startswith('/gcs/') or allow_local_files:
return input_path
else:
raise ValueE... | Gets the /gcs/ path for a given URI. | get_gcs_path | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preprocess_chat_dataset.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preprocess_chat_dataset.py | Apache-2.0 |
def get_gs_path(input_path: str, allow_local_files: bool) -> str:
"""Gets the gs:// path for a given URI."""
if input_path.startswith('/gcs/'):
return input_path.replace('/gcs/', 'gs://', 1)
elif input_path.startswith('gs://') or allow_local_files:
return input_path
else:
raise ValueEr... | Gets the gs:// path for a given URI. | get_gs_path | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preprocess_chat_dataset.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/preprocess_chat_dataset.py | Apache-2.0 |
def private_text_comparison_importer(
project: str,
location: str,
input_text: str,
inputs_field_name: str,
comma_separated_candidates_field_names: str,
choice_field_name: str,
split: str,
large_model_reference: str,
output_dataset_path: kfp.dsl.OutputPath(str), # pytype: disable=in... | Import a text dataset.
Args:
project: Project used to run the job.
location: Location used to run the job.
input_text: Path to text data. Supports glob patterns.
inputs_field_name: Name of field that contains input text.
comma_separated_candidates_field_names: Comma separated list of fields that
... | private_text_comparison_importer | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/private_text_comparison_importer.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/private_text_comparison_importer.py | Apache-2.0 |
def private_text_importer(
project: str,
location: str,
input_text: str,
inputs_field_name: str,
targets_field_name: str,
large_model_reference: str,
imported_data: dsl.Output[dsl.Dataset], # pylint: disable=unused-argument
imported_data_path: dsl.OutputPath(str), # pytype: disable=inv... | Import a text dataset.
Args:
project: Project used to run the job.
location: Location used to run the job.
input_text: Path to text data. Supports glob patterns.
inputs_field_name: Name of field that contains input text.
targets_field_name: Name of field that contains target text.
large_model... | private_text_importer | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/private_text_importer.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/private_text_importer.py | Apache-2.0 |
def pipeline(
prompt_dataset: str,
input_reward_model_path: str,
input_reward_adapter_path: str,
input_preference_dataset_path: str,
large_model_reference: str,
reward_model_reference: str,
policy_model_reference: str,
policy_model_path: str,
machine_type: str,
tuning_location: s... | Trains a reward model.
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 valid JSON that contains `author... | pipeline | python | kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/_implementation/llm/reinforcement_learning_graph.py | https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/_implementation/llm/reinforcement_learning_graph.py | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.