syne_tune.experiments.launchers.launch_remote_common module
- syne_tune.experiments.launchers.launch_remote_common.sagemaker_estimator_args(entry_point, experiment_tag, tuner_name, benchmark=None, sagemaker_backend=False, source_dependencies=None)[source]
Returns SageMaker estimator keyword arguments for remote tuning job.
Note: We switch off SageMaker profiler and debugger, as both are not needed and consume extra resources and may introduce instabilities.
- Parameters:
entry_point (
Path
) – Script for running HPO experiment, used forentry_point
andsource_dir
argumentsexperiment_tag (
str
) – Tag of experiment, used to createcheckpoint_s3_uri
tuner_name (
str
) – Name of tuner, used to createcheckpoint_s3_uri
benchmark (
Union
[SurrogateBenchmarkDefinition
,RealBenchmarkDefinition
,None
]) – Benchmark definition, optionalsagemaker_backend (
bool
) – Is remote tuning job running the SageMaker backend? If not, it either runs local or simulator backend. Defaults toFalse
source_dependencies (
Optional
[List
[str
]]) – If given, these are additional source dependencies passed to the SageMaker estimator
- Return type:
Dict
[str
,Any
]- Returns:
Keyword arguments for SageMaker estimator
- syne_tune.experiments.launchers.launch_remote_common.fit_sagemaker_estimator(backoff_wait_time, estimator, ntimes_resource_wait=100, **kwargs)[source]
Runs
estimator.fit(**kwargs)
. Ifbackoff_wait_time > 0
, we make sure that iffit
fails withClientError
of type “ResourceLimitExceeded”, we wait forbackoff_wait_time
seconds and try again (up tontimes_resource_wait
times).If
backoff_wait_time <= 0
, the call offit
is not wrapped.- Parameters:
backoff_wait_time (
int
) – See above.estimator (
EstimatorBase
) – SageMaker estimator to callfit
forntimes_resource_wait (
int
) – Maximum number of retrieskwargs – Arguments for
estimator.fit