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 for entry_point and source_dir arguments

  • experiment_tag (str) – Tag of experiment, used to create checkpoint_s3_uri

  • tuner_name (str) – Name of tuner, used to create checkpoint_s3_uri

  • benchmark (Union[SurrogateBenchmarkDefinition, RealBenchmarkDefinition, None]) – Benchmark definition, optional

  • sagemaker_backend (bool) – Is remote tuning job running the SageMaker backend? If not, it either runs local or simulator backend. Defaults to False

  • 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). If backoff_wait_time > 0, we make sure that if fit fails with ClientError of type “ResourceLimitExceeded”, we wait for backoff_wait_time seconds and try again (up to ntimes_resource_wait times).

If backoff_wait_time <= 0, the call of fit is not wrapped.

Parameters:
  • backoff_wait_time (int) – See above.

  • estimator (EstimatorBase) – SageMaker estimator to call fit for

  • ntimes_resource_wait (int) – Maximum number of retries

  • kwargs – Arguments for estimator.fit