in google_cloud_automlops/orchestration/base.py [0:0]
def build(self,
pipeline_params: dict,
custom_training_job_specs: Optional[List] = None):
"""Instantiates an abstract built method to create and write pipeline files. Also reads in
defaults file to save default arguments to attributes.
Files created must include:
1. README.md
2. Dockerfile
3. Requirements.txt
Args:
custom_training_job_specs (dict): Specifies the specs to run the training job with.
pipeline_params (Optional[List]): Dictionary containing runtime pipeline parameters.
Defaults to None.
Raises:
NotImplementedError: The subclass has not defined the `build` method.
"""
# Save parameters as attributes
self.custom_training_job_specs = custom_training_job_specs
self.pipeline_params = pipeline_params
# Extract additional attributes from defaults file
defaults = read_yaml_file(GENERATED_DEFAULTS_FILE)
self.project_id = defaults['gcp']['project_id']
self.gs_pipeline_job_spec_path = defaults['pipelines']['gs_pipeline_job_spec_path']
self.base_image = defaults['gcp']['base_image']
self.pubsub_topic_name = defaults['gcp']['pubsub_topic_name']
self.use_ci = defaults['tooling']['use_ci']
self.setup_model_monitoring = defaults['gcp']['setup_model_monitoring']
raise NotImplementedError('Subclass needs to define this.')