Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SDK - Components - Restored attribute order when generating component.yaml files #2262

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 72 additions & 72 deletions components/gcp/automl/create_dataset_for_tables/component.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,38 @@
name: Automl create dataset for tables
description: |
automl_create_dataset_for_tables creates an empty Dataset for AutoML tables
inputs:
- name: gcp_project_id
type: String
- name: gcp_region
type: String
- name: display_name
type: String
- name: description
type: String
optional: true
- name: tables_dataset_metadata
type: JsonObject
default: '{}'
optional: true
- name: retry
optional: true
- name: timeout
type: Float
optional: true
- name: metadata
type: JsonObject
optional: true
outputs:
- name: dataset_path
type: String
- name: create_time
type: String
- name: dataset_id
type: String
implementation:
container:
args:
- --gcp-project-id
- inputValue: gcp_project_id
- --gcp-region
- inputValue: gcp_region
- --display-name
- inputValue: display_name
- if:
cond:
isPresent: description
then:
- --description
- inputValue: description
- if:
cond:
isPresent: tables_dataset_metadata
then:
- --tables-dataset-metadata
- inputValue: tables_dataset_metadata
- if:
cond:
isPresent: retry
then:
- --retry
- inputValue: retry
- if:
cond:
isPresent: timeout
then:
- --timeout
- inputValue: timeout
- if:
cond:
isPresent: metadata
then:
- --metadata
- inputValue: metadata
- '----output-paths'
- outputPath: dataset_path
- outputPath: create_time
- outputPath: dataset_id
image: python:3.7
command:
- python3
- -u
Expand Down Expand Up @@ -116,34 +106,44 @@ implementation:
pass
with open(output_file, 'w') as f:
f.write(str(_outputs[idx]))
image: python:3.7
inputs:
- name: gcp_project_id
type: String
- name: gcp_region
type: String
- name: display_name
type: String
- name: description
optional: true
type: String
- default: '{}'
name: tables_dataset_metadata
optional: true
type: JsonObject
- name: retry
optional: true
- name: timeout
optional: true
type: Float
- name: metadata
optional: true
type: JsonObject
name: Automl create dataset for tables
outputs:
- name: dataset_path
type: String
- name: create_time
type: String
- name: dataset_id
type: String
args:
- --gcp-project-id
- inputValue: gcp_project_id
- --gcp-region
- inputValue: gcp_region
- --display-name
- inputValue: display_name
- if:
cond:
isPresent: description
then:
- --description
- inputValue: description
- if:
cond:
isPresent: tables_dataset_metadata
then:
- --tables-dataset-metadata
- inputValue: tables_dataset_metadata
- if:
cond:
isPresent: retry
then:
- --retry
- inputValue: retry
- if:
cond:
isPresent: timeout
then:
- --timeout
- inputValue: timeout
- if:
cond:
isPresent: metadata
then:
- --metadata
- inputValue: metadata
- '----output-paths'
- outputPath: dataset_path
- outputPath: create_time
- outputPath: dataset_id
132 changes: 66 additions & 66 deletions components/gcp/automl/create_model_for_tables/component.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
name: Automl create model for tables
inputs:
- name: gcp_project_id
type: String
- name: gcp_region
type: String
- name: display_name
type: String
- name: dataset_id
type: String
- name: target_column_path
type: String
optional: true
- name: input_feature_column_paths
type: JsonArray
optional: true
- name: optimization_objective
type: String
default: MAXIMIZE_AU_PRC
optional: true
- name: train_budget_milli_node_hours
type: Integer
default: '1000'
optional: true
outputs:
- name: model_path
type: String
- name: model_id
type: String
implementation:
container:
args:
- --gcp-project-id
- inputValue: gcp_project_id
- --gcp-region
- inputValue: gcp_region
- --display-name
- inputValue: display_name
- --dataset-id
- inputValue: dataset_id
- if:
cond:
isPresent: target_column_path
then:
- --target-column-path
- inputValue: target_column_path
- if:
cond:
isPresent: input_feature_column_paths
then:
- --input-feature-column-paths
- inputValue: input_feature_column_paths
- if:
cond:
isPresent: optimization_objective
then:
- --optimization-objective
- inputValue: optimization_objective
- if:
cond:
isPresent: train_budget_milli_node_hours
then:
- --train-budget-milli-node-hours
- inputValue: train_budget_milli_node_hours
- '----output-paths'
- outputPath: model_path
- outputPath: model_id
image: python:3.7
command:
- python3
- -u
Expand Down Expand Up @@ -109,33 +103,39 @@ implementation:
pass
with open(output_file, 'w') as f:
f.write(str(_outputs[idx]))
image: python:3.7
inputs:
- name: gcp_project_id
type: String
- name: gcp_region
type: String
- name: display_name
type: String
- name: dataset_id
type: String
- name: target_column_path
optional: true
type: String
- name: input_feature_column_paths
optional: true
type: JsonArray
- default: MAXIMIZE_AU_PRC
name: optimization_objective
optional: true
type: String
- default: '1000'
name: train_budget_milli_node_hours
optional: true
type: Integer
name: Automl create model for tables
outputs:
- name: model_path
type: String
- name: model_id
type: String
args:
- --gcp-project-id
- inputValue: gcp_project_id
- --gcp-region
- inputValue: gcp_region
- --display-name
- inputValue: display_name
- --dataset-id
- inputValue: dataset_id
- if:
cond:
isPresent: target_column_path
then:
- --target-column-path
- inputValue: target_column_path
- if:
cond:
isPresent: input_feature_column_paths
then:
- --input-feature-column-paths
- inputValue: input_feature_column_paths
- if:
cond:
isPresent: optimization_objective
then:
- --optimization-objective
- inputValue: optimization_objective
- if:
cond:
isPresent: train_budget_milli_node_hours
then:
- --train-budget-milli-node-hours
- inputValue: train_budget_milli_node_hours
- '----output-paths'
- outputPath: model_path
- outputPath: model_id
82 changes: 41 additions & 41 deletions components/gcp/automl/import_data_from_bigquery/component.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
name: Automl import data from bigquery
inputs:
- name: dataset_path
- name: input_uri
type: String
- name: retry
optional: true
- name: timeout
optional: true
- name: metadata
type: JsonObject
optional: true
outputs:
- name: dataset_path
type: String
implementation:
container:
args:
- --dataset-path
- inputValue: dataset_path
- --input-uri
- inputValue: input_uri
- if:
cond:
isPresent: retry
then:
- --retry
- inputValue: retry
- if:
cond:
isPresent: timeout
then:
- --timeout
- inputValue: timeout
- if:
cond:
isPresent: metadata
then:
- --metadata
- inputValue: metadata
- '----output-paths'
- outputPath: dataset_path
image: python:3.7
command:
- python3
- -u
Expand Down Expand Up @@ -90,19 +81,28 @@ implementation:
pass
with open(output_file, 'w') as f:
f.write(str(_outputs[idx]))
image: python:3.7
inputs:
- name: dataset_path
- name: input_uri
type: String
- name: retry
optional: true
- name: timeout
optional: true
- name: metadata
optional: true
type: JsonObject
name: Automl import data from bigquery
outputs:
- name: dataset_path
type: String
args:
- --dataset-path
- inputValue: dataset_path
- --input-uri
- inputValue: input_uri
- if:
cond:
isPresent: retry
then:
- --retry
- inputValue: retry
- if:
cond:
isPresent: timeout
then:
- --timeout
- inputValue: timeout
- if:
cond:
isPresent: metadata
then:
- --metadata
- inputValue: metadata
- '----output-paths'
- outputPath: dataset_path
Loading