GoogleCloudPlatform / automlops

Build MLOps Pipelines in Minutes
Apache License 2.0
212 stars 38 forks source link

Code generation failed using github-actions #60

Open lhd0430 opened 6 months ago

lhd0430 commented 6 months ago

I tried the following code from the example in order to generate the scripts for github-actions. It errors out when validating the project_number parameter.

AutoMLOps.generate(project_id=PROJECT_ID,
                   pipeline_params=pipeline_params,
                   use_ci=True,
                   naming_prefix=MODEL_ID,
                   deployment_framework= 'github-actions',
                   project_number="666724832485",
                   schedule_pattern='59 11 * * 0', # retrain every Sunday at Midnight
                   setup_model_monitoring=True     # use this if you would like to use Vertex Model Monitoring
)

The error message:

ValidationError: 3 validation errors for GitHubActionsConfig
workload_identity_pool
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.3/v/string_type
workload_identity_provider
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.3/v/string_type
workload_identity_service_account
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.3/v/string_type
allegra-noto commented 6 months ago

Hi @lhd0430, workload_identity_pool, workload_identity_provider, and workload_identity_service_account are all required parameters for utilizing github-actions.

workload_identity_pool: Pool for workload identity federation. workload_identity_provider: Provider for workload identity federation. workload_identity_service_account: Service account for workload identity federation (specify the full string).

Please see the following GCP documentation for more information on these parameters: https://cloud.google.com/iam/docs/workload-identity-federation.