Skip to content

Commit 2deab8a

Browse files
committed
Fix formatting
1 parent 4f98141 commit 2deab8a

File tree

4 files changed

+34
-34
lines changed

4 files changed

+34
-34
lines changed

src/sagemaker/inputs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ class CompilationInput(object):
143143
It can be used when calling ``sagemaker.model.Model.compile_model()``
144144
145145
Parameters:
146-
147146
target_instance_type(str): Identifies the device that you want to
148147
run your model after compilation, for example: ml_c5. For allowed
149148
strings see
@@ -192,6 +191,7 @@ class CompilationInput(object):
192191
target_platform_accelerator: str = attr.ib(default=None)
193192
compiler_options: dict = attr.ib(factory=dict)
194193

194+
195195
@attr.s
196196
class TransformInput(object):
197197
"""Create a class containing all the parameters.

src/sagemaker/model.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,13 @@ def _compilation_job_config(
412412
}
413413

414414
def _get_compilation_args(self, estimator, inputs):
415-
"""Constructs a dict of arguments for an Amazon SageMaker compilation job from the estimator.
416-
Args:
417-
estimator (sagemaker.estimator.EstimatorBase): Estimator object
418-
created by the user.
419-
inputs (CompilationInput): class containing all the parameters that
420-
can be used when calling ``sagemaker.model.Model.compile_model()``
415+
"""Constructs a dict of arguments for an Amazon SageMaker compilation job from estimator.
416+
417+
Args:
418+
estimator (sagemaker.estimator.EstimatorBase): Estimator object
419+
created by the user.
420+
inputs (CompilationInput): class containing all the parameters that
421+
can be used when calling ``sagemaker.model.Model.compile_model()``
421422
"""
422423

423424
if not isinstance(inputs, CompilationInput):

src/sagemaker/session.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ def _get_compilation_request(
18481848
role,
18491849
stop_condition,
18501850
tags=None,
1851-
vpc_config=None
1851+
vpc_config=None,
18521852
):
18531853
"""Construct CreateCompilationJob request
18541854

src/sagemaker/workflow/steps.py

+25-26
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,19 @@
1414
from __future__ import absolute_import
1515

1616
import abc
17-
1817
from enum import Enum
1918
from typing import Dict, List, Union
2019

2120
import attr
2221

2322
from sagemaker.estimator import EstimatorBase, _TrainingJob
24-
from sagemaker.inputs import CreateModelInput, TrainingInput, TransformInput, FileSystemInput, CompilationInput
23+
from sagemaker.inputs import (
24+
CompilationInput,
25+
CreateModelInput,
26+
FileSystemInput,
27+
TrainingInput,
28+
TransformInput,
29+
)
2530
from sagemaker.model import Model
2631
from sagemaker.processing import (
2732
ProcessingInput,
@@ -31,16 +36,9 @@
3136
)
3237
from sagemaker.transformer import Transformer, _TransformJob
3338
from sagemaker.tuner import HyperparameterTuner, _TuningJob
34-
from sagemaker.workflow.entities import (
35-
DefaultEnumMeta,
36-
Entity,
37-
RequestType,
38-
)
39-
from sagemaker.workflow.properties import (
40-
PropertyFile,
41-
Properties,
42-
)
39+
from sagemaker.workflow.entities import DefaultEnumMeta, Entity, RequestType
4340
from sagemaker.workflow.functions import Join
41+
from sagemaker.workflow.properties import Properties, PropertyFile
4442
from sagemaker.workflow.retry import RetryPolicy
4543

4644

@@ -688,23 +686,24 @@ class CompilationStep(Step):
688686
"""Compilation step for workflow."""
689687

690688
def __init__(
691-
self,
692-
name: str,
693-
estimator: EstimatorBase,
694-
model: Model,
695-
inputs: CompilationInput = None,
696-
job_arguments: List[str] = None,
697-
depends_on: Union[List[str], List[Step]] = None,
698-
retry_policies: List[RetryPolicy] = None,
699-
display_name: str = None,
700-
description: str = None,
701-
cache_config: CacheConfig = None
689+
self,
690+
name: str,
691+
estimator: EstimatorBase,
692+
model: Model,
693+
inputs: CompilationInput = None,
694+
job_arguments: List[str] = None,
695+
depends_on: Union[List[str], List[Step]] = None,
696+
retry_policies: List[RetryPolicy] = None,
697+
display_name: str = None,
698+
description: str = None,
699+
cache_config: CacheConfig = None,
702700
):
703-
"""Construct a CompilationStep, given an given an `EstimatorBase` instance and
704-
a `sagemaker.model.Model` instance.
701+
"""Construct a CompilationStep.
702+
703+
Given an `EstimatorBase` and a `sagemaker.model.Model` instance construct a CompilationStep.
705704
706-
In addition to the estimator and Model instances, the other arguments are those that are supplied to
707-
the `compile_model` method of the `sagemaker.model.Model.compile_model`.
705+
In addition to the estimator and Model instances, the other arguments are those that are
706+
supplied to the `compile_model` method of the `sagemaker.model.Model.compile_model`.
708707
709708
Args:
710709
name (str): The name of the compilation step.

0 commit comments

Comments
 (0)