Skip to content

Commit

Permalink
updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
srastatter committed May 23, 2024
1 parent dbf327f commit d1747d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion google_cloud_automlops/deployments/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self):
self.source_repo_type = defaults['gcp']['source_repository_type'] if self.use_ci else None

def build(self):
"""Abstract method to create all files in the #TODO
"""Abstract method to create all files related to CI/CD deployments.
Raises:
NotImplementedError: The subclass has not defined the `build` method.
Expand Down
2 changes: 1 addition & 1 deletion google_cloud_automlops/orchestration/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def __init__(self, comps: list) -> None:


class BaseServices():
"""The Services object will contain TODO: fill out what this does
"""The Services object will contain code within the services/ dir.
"""

def __init__(self) -> None:
Expand Down
22 changes: 12 additions & 10 deletions google_cloud_automlops/orchestration/kfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@


class KFPComponent(BaseComponent):
"""Creates a KFP specific Component object for #TODO: add more
"""Creates a KFP specific Component object for Kubeflow Pipelines.
Args:
BaseComponent (object): Generic Component object.
Expand All @@ -85,7 +85,7 @@ def build(self):
comp_yaml_path = component_dir + '/component.yaml'

# Build necessary folders
# TODO: make this only happen for the first component? or pull into automlops.py
# TODO: make this only happen for the first component or pull into automlops.py
make_dirs([
component_dir,
BASE_DIR + 'components/component_base/src/'])
Expand Down Expand Up @@ -128,7 +128,7 @@ def build(self):


class KFPPipeline(BasePipeline):
"""Creates a KFP specific Pipeline object for #TODO: add more
"""Creates a KFP specific Pipeline object for Kubeflow Pipelines.
Args:
BasePipeline (object): Generic Pipeline object.
Expand Down Expand Up @@ -156,7 +156,8 @@ def __init__(self,
description=description,
comps_dict=comps_dict)

# Create pipeline scaffold attribute # TODO: more descriptive
# Create pipeline scaffold attribute, which is an empty pipelines template
# without the DAG definition
self.pipeline_scaffold = (
self._get_pipeline_decorator()
+ self.src_code
Expand Down Expand Up @@ -356,13 +357,14 @@ def _get_component_list(self) -> str:
return [comp.name for comp in self.comps]

def _create_component_base_requirements(self) -> str:
"""Writes a requirements.txt to the component_base directory. Infers pip requirements from
the python srcfiles using pipreqs. Takes user-inputted requirements, and addes some default
gcp packages as well as packages that are often missing in setup.py files (e.g db_types,
pyarrow, gcsfs, fsspec). TODO: update this as it returns a string, doesn't write a file.
"""Creates the contents of a requirements.txt to the component_base directory.
Optionally infer pip requirements from the python srcfiles using pipreqs.
Takes user-inputted requirements, and addes some default gcp packages as well as
packages that are often missing in setup.py files (e.g db_types, pyarrow,
gcsfs, fsspec).
Returns:
str: TODO
str: contents of the requirements.txt for the pipeline job
"""
reqs_filename = f'{GENERATED_COMPONENT_BASE}/requirements.txt'
default_gcp_reqs = [
Expand Down Expand Up @@ -431,7 +433,7 @@ def _create_component_base_requirements(self) -> str:


class KFPServices(BaseServices):
"""Creates a KFP specific Services object for #TODO: add more
"""Creates a KFP specific Services object for kubeflow pipelines.
Args:
BaseServices (object): Generic Services object.
Expand Down

0 comments on commit d1747d3

Please sign in to comment.