diff --git a/.pylintrc b/.pylintrc index ed98a3b05a..fecdb49e56 100644 --- a/.pylintrc +++ b/.pylintrc @@ -84,7 +84,6 @@ disable= line-too-long, # We let Flake8 take care of this # TODO: Fix these and stop relying on flake8 len-as-condition, # TODO: Enable this check once pylint 2.4.0 is released and consumed due to the fix in https://github.com/PyCQA/pylint/issues/2684 import-error, # Since we run Pylint before any of our builds in tox, this will always fail - attribute-defined-outside-init, # TODO: Fix scope protected-access, # TODO: Fix access abstract-method, # TODO: Fix abstract methods wrong-import-order, # TODO: Fix import order diff --git a/src/sagemaker/amazon/amazon_estimator.py b/src/sagemaker/amazon/amazon_estimator.py index 770358c5a8..7f4c49c879 100644 --- a/src/sagemaker/amazon/amazon_estimator.py +++ b/src/sagemaker/amazon/amazon_estimator.py @@ -55,7 +55,7 @@ def __init__( data_location = data_location or "s3://{}/sagemaker-record-sets/".format( self.sagemaker_session.default_bucket() ) - self.data_location = data_location + self._data_location = data_location def train_image(self): return get_image_uri( diff --git a/src/sagemaker/analytics.py b/src/sagemaker/analytics.py index 019c660ae1..1b808aead6 100644 --- a/src/sagemaker/analytics.py +++ b/src/sagemaker/analytics.py @@ -37,6 +37,9 @@ class AnalyticsMetricsBase(with_metaclass(ABCMeta, object)): Understands common functionality like persistence and caching. """ + def __init__(self): + self._dataframe = None + def export_csv(self, filename): """Persists the analytics dataframe to a file. @@ -88,6 +91,9 @@ def __init__(self, hyperparameter_tuning_job_name, sagemaker_session=None): sagemaker_session = sagemaker_session or Session() self._sage_client = sagemaker_session.sagemaker_client self._tuning_job_name = hyperparameter_tuning_job_name + self._tuning_job_describe_result = None + self._training_job_summaries = None + super(HyperparameterTuningJobAnalytics, self).__init__() self.clear_cache() @property @@ -240,6 +246,8 @@ def __init__( self._metric_names = metric_names else: self._metric_names = self._metric_names_for_training_job() + + super(TrainingJobAnalytics, self).__init__() self.clear_cache() @property diff --git a/src/sagemaker/estimator.py b/src/sagemaker/estimator.py index b68e0ededa..653c0942ae 100644 --- a/src/sagemaker/estimator.py +++ b/src/sagemaker/estimator.py @@ -166,6 +166,7 @@ def __init__( self.output_path = output_path self.output_kms_key = output_kms_key self.latest_training_job = None + self.deploy_instance_type = None self._compiled_models = {} @@ -1086,6 +1087,8 @@ def __init__( self.image_name = image_name self._enable_network_isolation = enable_network_isolation + self.uploaded_code = None + self._hyperparameters = hyperparameters or {} def enable_network_isolation(self): diff --git a/src/sagemaker/local/entities.py b/src/sagemaker/local/entities.py index 53bc794a9f..b92ece29eb 100644 --- a/src/sagemaker/local/entities.py +++ b/src/sagemaker/local/entities.py @@ -75,7 +75,7 @@ def start(self, input_data_config, output_data_config, hyperparameters, job_name self.model_artifacts = self.container.train( input_data_config, output_data_config, hyperparameters, job_name ) - self.end = datetime.datetime.now() + self.end_time = datetime.datetime.now() self.state = self._COMPLETED def describe(self): @@ -110,6 +110,9 @@ def __init__(self, transform_job_name, model_name, local_session=None): self.start_time = None self.end_time = None self.batch_strategy = None + self.transform_resources = None + self.input_data = None + self.output_data = None self.environment = {} self.state = _LocalTransformJob._CREATING diff --git a/src/sagemaker/model.py b/src/sagemaker/model.py index cb17454683..be840d6885 100644 --- a/src/sagemaker/model.py +++ b/src/sagemaker/model.py @@ -100,6 +100,7 @@ def __init__( self.vpc_config = vpc_config self.sagemaker_session = sagemaker_session self._model_name = None + self.endpoint_name = None self._is_compiled_model = False self._enable_network_isolation = enable_network_isolation diff --git a/src/sagemaker/pipeline.py b/src/sagemaker/pipeline.py index a91631dde7..c70b2b17ca 100644 --- a/src/sagemaker/pipeline.py +++ b/src/sagemaker/pipeline.py @@ -51,6 +51,7 @@ def __init__( self.vpc_config = vpc_config self.sagemaker_session = sagemaker_session self._model_name = None + self.endpoint_name = None def pipeline_container_def(self, instance_type): """Return a dict created by ``sagemaker.pipeline_container_def()`` for deploying this model to a specified diff --git a/src/sagemaker/tuner.py b/src/sagemaker/tuner.py index 0c423e1c3c..8f74f0cd77 100644 --- a/src/sagemaker/tuner.py +++ b/src/sagemaker/tuner.py @@ -247,6 +247,7 @@ def __init__( self.latest_tuning_job = None self.warm_start_config = warm_start_config self.early_stopping_type = early_stopping_type + self.static_hyperparameters = None def _prepare_for_training(self, job_name=None, include_cls_metadata=False): if job_name is not None: