Skip to content

Commit 8d474d6

Browse files
committed
Ran linter
1 parent 348dae9 commit 8d474d6

8 files changed

+15
-21
lines changed

samples/model-builder/create_and_import_dataset_image_sample_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import create_and_import_dataset_image_sample
1516

1617
from google.cloud.aiplatform import schema
1718

18-
import create_and_import_dataset_image_sample
1919
import test_constants as constants
2020

2121

samples/model-builder/create_and_import_dataset_text_sample_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import create_and_import_dataset_text_sample
1516

1617
from google.cloud.aiplatform import schema
1718

18-
import create_and_import_dataset_text_sample
1919
import test_constants as constants
2020

2121

samples/model-builder/deploy_model_with_automatic_resources_sample.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from typing import Dict, Optional, Sequence, Tuple
1516

1617
from google.cloud import aiplatform
17-
from typing import Optional, Sequence, Tuple, Dict
18-
from google.cloud.aiplatform import explain
18+
1919

2020
# [START aiplatform_sdk_deploy_model_with_automatic_resources_sample]
2121
def deploy_model_with_automatic_resources_sample(
2222
project,
2323
location,
2424
model_name: str,
25-
endpoint: Optional["Endpoint"] = None,
25+
endpoint: Optional[aiplatform.Endpoint] = None,
2626
deployed_model_display_name: Optional[str] = None,
2727
traffic_percentage: Optional[int] = 0,
2828
traffic_split: Optional[Dict[str, int]] = None,

samples/model-builder/deploy_model_with_dedicated_resources_sample.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from typing import Dict, Optional, Sequence, Tuple
1516

1617
from google.cloud import aiplatform
17-
from typing import Optional, Sequence, Tuple, Dict
1818
from google.cloud.aiplatform import explain
1919

20+
2021
# [START aiplatform_sdk_deploy_model_with_dedicated_resources_sample]
2122
def deploy_model_with_dedicated_resources_sample(
2223
project,
2324
location,
2425
model_name: str,
2526
machine_type: str,
26-
endpoint: Optional["Endpoint"] = None,
27+
endpoint: Optional[aiplatform.Endpoint] = None,
2728
deployed_model_display_name: Optional[str] = None,
2829
traffic_percentage: Optional[int] = 0,
2930
traffic_split: Optional[Dict[str, int]] = None,

samples/model-builder/get_model_sample.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,10 @@
1414

1515

1616
from google.cloud import aiplatform
17-
from typing import Optional, Sequence, Dict
18-
from google.cloud.aiplatform import explain
17+
1918

2019
# [START aiplatform_sdk_get_model_sample]
21-
def get_model_sample(
22-
project: str,
23-
location: str,
24-
model_name: str
25-
):
20+
def get_model_sample(project: str, location: str, model_name: str):
2621

2722
aiplatform.init(project=project, location=location)
2823

samples/model-builder/get_model_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ def test_get_model_sample(mock_sdk_init, mock_init_model):
2929
project=constants.PROJECT, location=constants.LOCATION
3030
)
3131

32-
mock_init_model.assert_called_once_with(
33-
model_name=constants.MODEL_NAME
34-
)
32+
mock_init_model.assert_called_once_with(model_name=constants.MODEL_NAME)

samples/model-builder/upload_model_sample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from typing import Dict, Optional, Sequence
1516

1617
from google.cloud import aiplatform
17-
from typing import Optional, Sequence, Dict
1818
from google.cloud.aiplatform import explain
1919

20+
2021
# [START aiplatform_sdk_upload_model_sample]
2122
def upload_model_sample(
2223
project: str,

samples/model-builder/upload_model_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
16-
import upload_model_sample
1715
import test_constants as constants
16+
import upload_model_sample
1817

1918

2019
def test_upload_model_sample(mock_sdk_init, mock_upload_model):
@@ -36,7 +35,7 @@ def test_upload_model_sample(mock_sdk_init, mock_upload_model):
3635
serving_container_environment_variables=constants.SERVING_CONTAINER_ENVIRONMENT_VARIABLES,
3736
serving_container_ports=constants.SERVING_CONTAINER_PORTS,
3837
explanation_metadata=constants.EXPLANATION_METADATA,
39-
explanation_parameters=constants.EXPLANATION_PARAMETERS
38+
explanation_parameters=constants.EXPLANATION_PARAMETERS,
4039
)
4140

4241
mock_sdk_init.assert_called_once_with(

0 commit comments

Comments
 (0)