Skip to content

Commit

Permalink
Ran linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmkc committed May 3, 2021
1 parent b8efc42 commit 12db685
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud import aiplatform
from typing import List, Optional, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_create_training_pipeline_custom_container_job_sample]
def create_training_pipeline_custom_container_job_sample(
project: str,
location: str,
staging_bucket: str,
display_name: str,
container_uri: str,
model_serving_container_image_uri: str,
container_uri: str,
model_serving_container_image_uri: str,
model_display_name: Optional[str] = None,
args: Optional[List[Union[str, float, int]]] = None,
replica_count: int = 1,
Expand Down Expand Up @@ -52,7 +53,7 @@ def create_training_pipeline_custom_container_job_sample(
accelerator_count=accelerator_count,
training_fraction_split=training_fraction_split,
validation_fraction_split=validation_fraction_split,
test_fraction_split=test_fraction_split,
test_fraction_split=test_fraction_split,
sync=sync,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ def test_create_training_pipeline_custom_container_job_sample(
)

mock_sdk_init.assert_called_once_with(
project=constants.PROJECT, location=constants.LOCATION, staging_bucket=constants.STAGING_BUCKET
project=constants.PROJECT,
location=constants.LOCATION,
staging_bucket=constants.STAGING_BUCKET,
)

mock_init_custom_container_training_job.assert_called_once_with(
display_name=constants.DISPLAY_NAME,
container_uri=constants.CONTAINER_URI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud import aiplatform
from typing import List, Optional, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_create_training_pipeline_custom_package_job_sample]
def create_training_pipeline_custom_package_job_sample(
Expand All @@ -24,8 +25,8 @@ def create_training_pipeline_custom_package_job_sample(
display_name: str,
python_package_gcs_uri: str,
python_module_name: str,
container_uri: str,
model_serving_container_image_uri: str,
container_uri: str,
model_serving_container_image_uri: str,
model_display_name: Optional[str] = None,
args: Optional[List[Union[str, float, int]]] = None,
replica_count: int = 1,
Expand Down Expand Up @@ -56,7 +57,7 @@ def create_training_pipeline_custom_package_job_sample(
accelerator_count=accelerator_count,
training_fraction_split=training_fraction_split,
validation_fraction_split=validation_fraction_split,
test_fraction_split=test_fraction_split,
test_fraction_split=test_fraction_split,
sync=sync,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_create_training_pipeline_custom_package_job_sample(
staging_bucket=constants.STAGING_BUCKET,
display_name=constants.DISPLAY_NAME,
python_package_gcs_uri=constants.PYTHON_PACKAGE_GCS_URI,
python_module_name=constants.PYTHON_MODULE_NAME,
python_module_name=constants.PYTHON_MODULE_NAME,
container_uri=constants.CONTAINER_URI,
args=constants.ARGS,
model_serving_container_image_uri=constants.CONTAINER_URI,
Expand All @@ -44,9 +44,11 @@ def test_create_training_pipeline_custom_package_job_sample(
)

mock_sdk_init.assert_called_once_with(
project=constants.PROJECT, location=constants.LOCATION, staging_bucket=constants.STAGING_BUCKET
project=constants.PROJECT,
location=constants.LOCATION,
staging_bucket=constants.STAGING_BUCKET,
)

mock_init_custom_package_training_job.assert_called_once_with(
display_name=constants.DISPLAY_NAME,
python_package_gcs_uri=constants.PYTHON_PACKAGE_GCS_URI,
Expand Down

0 comments on commit 12db685

Please sign in to comment.