16
16
import json
17
17
import logging
18
18
import os
19
- from typing import Dict
19
+ from typing import Any , Dict
20
20
import uuid
21
21
from abc import ABCMeta , abstractmethod
22
22
@@ -364,7 +364,7 @@ def __init__(
364
364
try to use either CodeCommit credential helper or local
365
365
credential storage for authentication.
366
366
hyperparameters (dict): Dictionary containing the hyperparameters to
367
- initialize this estimator with.
367
+ initialize this estimator with. (Default: None).
368
368
container_log_level (int): Log level to use within the container
369
369
(default: logging.INFO). Valid values are defined in the Python
370
370
logging module.
@@ -375,7 +375,7 @@ def __init__(
375
375
If not specified, the default ``code location`` is s3://output_bucket/job-name/.
376
376
entry_point (str): Path (absolute or relative) to the local Python
377
377
source file which should be executed as the entry point to
378
- training. If ``source_dir`` is specified, then ``entry_point``
378
+ training. (Default: None). If ``source_dir`` is specified, then ``entry_point``
379
379
must point to a file located at the root of ``source_dir``.
380
380
If 'git_config' is provided, 'entry_point' should be
381
381
a relative location to the Python source file in the Git repo.
@@ -583,7 +583,7 @@ def _get_or_create_name(self, name=None):
583
583
return name_from_base (self .base_job_name )
584
584
585
585
@staticmethod
586
- def _json_encode_hyperparameters (hyperparameters : dict ) -> dict :
586
+ def _json_encode_hyperparameters (hyperparameters : Dict [ str , Any ] ) -> Dict [ str , Any ] :
587
587
"""Applies Json encoding for certain Hyperparameter types, returns hyperparameters.
588
588
589
589
Args:
@@ -679,7 +679,7 @@ def _script_mode_hyperparam_update(self, code_dir: str, script: str) -> None:
679
679
self ._hyperparameters .update (EstimatorBase ._json_encode_hyperparameters (hyperparams ))
680
680
681
681
def _stage_user_code_in_s3 (self ) -> str :
682
- """Upload the user training script to s3 and return the location .
682
+ """Upload the user training script to s3 and return the s3 URI .
683
683
684
684
Returns: s3 uri
685
685
"""
@@ -2691,7 +2691,7 @@ def _model_entry_point(self):
2691
2691
return None
2692
2692
2693
2693
def set_hyperparameters (self , ** kwargs ):
2694
- """Sets hyperparameters ."""
2694
+ """Escape the dict argument as JSON, update the private hyperparameter attribute ."""
2695
2695
self ._hyperparameters .update (EstimatorBase ._json_encode_hyperparameters (kwargs ))
2696
2696
2697
2697
def hyperparameters (self ):
0 commit comments