Skip to content

Commit

Permalink
fix: show inherited SDK methods in pydoc (#1707)
Browse files Browse the repository at this point in the history
Co-authored-by: nayaknishant <[email protected]>
  • Loading branch information
jaycee-li and nayaknishant authored Sep 30, 2022
1 parent 9e1d796 commit 2b7583b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 176 deletions.
1 change: 1 addition & 0 deletions docs/aiplatform/services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Google Cloud Aiplatform SDK
.. automodule:: google.cloud.aiplatform
:members:
:show-inheritance:
:inherited-members:
176 changes: 0 additions & 176 deletions google/cloud/aiplatform/training_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5150,94 +5150,6 @@ class AutoMLForecastingTrainingJob(_ForecastingTrainingJob):
_training_task_definition = schema.training_job.definition.automl_forecasting
_supported_training_schemas = (schema.training_job.definition.automl_forecasting,)

def run(
self,
dataset: datasets.TimeSeriesDataset,
target_column: str,
time_column: str,
time_series_identifier_column: str,
unavailable_at_forecast_columns: List[str],
available_at_forecast_columns: List[str],
forecast_horizon: int,
data_granularity_unit: str,
data_granularity_count: int,
training_fraction_split: Optional[float] = None,
validation_fraction_split: Optional[float] = None,
test_fraction_split: Optional[float] = None,
predefined_split_column_name: Optional[str] = None,
timestamp_split_column_name: Optional[str] = None,
weight_column: Optional[str] = None,
time_series_attribute_columns: Optional[List[str]] = None,
context_window: Optional[int] = None,
export_evaluated_data_items: bool = False,
export_evaluated_data_items_bigquery_destination_uri: Optional[str] = None,
export_evaluated_data_items_override_destination: bool = False,
quantiles: Optional[List[float]] = None,
validation_options: Optional[str] = None,
budget_milli_node_hours: int = 1000,
model_display_name: Optional[str] = None,
model_labels: Optional[Dict[str, str]] = None,
model_id: Optional[str] = None,
parent_model: Optional[str] = None,
is_default_version: Optional[bool] = True,
model_version_aliases: Optional[Sequence[str]] = None,
model_version_description: Optional[str] = None,
additional_experiments: Optional[List[str]] = None,
hierarchy_group_columns: Optional[List[str]] = None,
hierarchy_group_total_weight: Optional[float] = None,
hierarchy_temporal_total_weight: Optional[float] = None,
hierarchy_group_temporal_total_weight: Optional[float] = None,
window_column: Optional[str] = None,
window_stride_length: Optional[int] = None,
window_max_count: Optional[int] = None,
holiday_regions: Optional[List[str]] = None,
sync: bool = True,
create_request_timeout: Optional[float] = None,
) -> models.Model:
return super().run(
dataset=dataset,
target_column=target_column,
time_column=time_column,
time_series_identifier_column=time_series_identifier_column,
unavailable_at_forecast_columns=unavailable_at_forecast_columns,
available_at_forecast_columns=available_at_forecast_columns,
forecast_horizon=forecast_horizon,
data_granularity_unit=data_granularity_unit,
data_granularity_count=data_granularity_count,
training_fraction_split=training_fraction_split,
validation_fraction_split=validation_fraction_split,
test_fraction_split=test_fraction_split,
predefined_split_column_name=predefined_split_column_name,
timestamp_split_column_name=timestamp_split_column_name,
weight_column=weight_column,
time_series_attribute_columns=time_series_attribute_columns,
context_window=context_window,
budget_milli_node_hours=budget_milli_node_hours,
export_evaluated_data_items=export_evaluated_data_items,
export_evaluated_data_items_bigquery_destination_uri=export_evaluated_data_items_bigquery_destination_uri,
export_evaluated_data_items_override_destination=export_evaluated_data_items_override_destination,
quantiles=quantiles,
validation_options=validation_options,
model_display_name=model_display_name,
model_labels=model_labels,
model_id=model_id,
parent_model=parent_model,
is_default_version=is_default_version,
model_version_aliases=model_version_aliases,
model_version_description=model_version_description,
additional_experiments=additional_experiments,
hierarchy_group_columns=hierarchy_group_columns,
hierarchy_group_total_weight=hierarchy_group_total_weight,
hierarchy_temporal_total_weight=hierarchy_temporal_total_weight,
hierarchy_group_temporal_total_weight=hierarchy_group_temporal_total_weight,
window_column=window_column,
window_stride_length=window_stride_length,
window_max_count=window_max_count,
holiday_regions=holiday_regions,
sync=sync,
create_request_timeout=create_request_timeout,
)


class SequenceToSequencePlusForecastingTrainingJob(_ForecastingTrainingJob):
_model_type = "Seq2Seq"
Expand All @@ -5246,94 +5158,6 @@ class SequenceToSequencePlusForecastingTrainingJob(_ForecastingTrainingJob):
schema.training_job.definition.seq2seq_plus_forecasting,
)

def run(
self,
dataset: datasets.TimeSeriesDataset,
target_column: str,
time_column: str,
time_series_identifier_column: str,
unavailable_at_forecast_columns: List[str],
available_at_forecast_columns: List[str],
forecast_horizon: int,
data_granularity_unit: str,
data_granularity_count: int,
training_fraction_split: Optional[float] = None,
validation_fraction_split: Optional[float] = None,
test_fraction_split: Optional[float] = None,
predefined_split_column_name: Optional[str] = None,
timestamp_split_column_name: Optional[str] = None,
weight_column: Optional[str] = None,
time_series_attribute_columns: Optional[List[str]] = None,
context_window: Optional[int] = None,
export_evaluated_data_items: bool = False,
export_evaluated_data_items_bigquery_destination_uri: Optional[str] = None,
export_evaluated_data_items_override_destination: bool = False,
quantiles: Optional[List[float]] = None,
validation_options: Optional[str] = None,
budget_milli_node_hours: int = 1000,
model_display_name: Optional[str] = None,
model_labels: Optional[Dict[str, str]] = None,
model_id: Optional[str] = None,
parent_model: Optional[str] = None,
is_default_version: Optional[bool] = True,
model_version_aliases: Optional[Sequence[str]] = None,
model_version_description: Optional[str] = None,
additional_experiments: Optional[List[str]] = None,
hierarchy_group_columns: Optional[List[str]] = None,
hierarchy_group_total_weight: Optional[float] = None,
hierarchy_temporal_total_weight: Optional[float] = None,
hierarchy_group_temporal_total_weight: Optional[float] = None,
window_column: Optional[str] = None,
window_stride_length: Optional[int] = None,
window_max_count: Optional[int] = None,
holiday_regions: Optional[List[str]] = None,
sync: bool = True,
create_request_timeout: Optional[float] = None,
) -> models.Model:
return super().run(
dataset=dataset,
target_column=target_column,
time_column=time_column,
time_series_identifier_column=time_series_identifier_column,
unavailable_at_forecast_columns=unavailable_at_forecast_columns,
available_at_forecast_columns=available_at_forecast_columns,
forecast_horizon=forecast_horizon,
data_granularity_unit=data_granularity_unit,
data_granularity_count=data_granularity_count,
training_fraction_split=training_fraction_split,
validation_fraction_split=validation_fraction_split,
test_fraction_split=test_fraction_split,
predefined_split_column_name=predefined_split_column_name,
timestamp_split_column_name=timestamp_split_column_name,
model_id=model_id,
parent_model=parent_model,
is_default_version=is_default_version,
model_version_aliases=model_version_aliases,
model_version_description=model_version_description,
weight_column=weight_column,
time_series_attribute_columns=time_series_attribute_columns,
context_window=context_window,
budget_milli_node_hours=budget_milli_node_hours,
export_evaluated_data_items=export_evaluated_data_items,
export_evaluated_data_items_bigquery_destination_uri=export_evaluated_data_items_bigquery_destination_uri,
export_evaluated_data_items_override_destination=export_evaluated_data_items_override_destination,
quantiles=quantiles,
validation_options=validation_options,
model_display_name=model_display_name,
model_labels=model_labels,
additional_experiments=additional_experiments,
hierarchy_group_columns=hierarchy_group_columns,
hierarchy_group_total_weight=hierarchy_group_total_weight,
hierarchy_temporal_total_weight=hierarchy_temporal_total_weight,
hierarchy_group_temporal_total_weight=hierarchy_group_temporal_total_weight,
window_column=window_column,
window_stride_length=window_stride_length,
window_max_count=window_max_count,
holiday_regions=holiday_regions,
sync=sync,
create_request_timeout=create_request_timeout,
)


class AutoMLImageTrainingJob(_TrainingJob):
_supported_training_schemas = (
Expand Down

0 comments on commit 2b7583b

Please sign in to comment.