TimeSeriesCloudPredictor.fit#
- TimeSeriesCloudPredictor.fit(*, predictor_init_args: Dict[str, Any], predictor_fit_args: Dict[str, Any], id_column: str, timestamp_column: str, static_features: Optional[Union[str, DataFrame]] = None, framework_version: str = 'latest', job_name: Optional[str] = None, instance_type: str = 'ml.m5.2xlarge', instance_count: int = 1, volume_size: int = 100, custom_image_uri: Optional[str] = None, wait: bool = True, backend_kwargs: Optional[Dict] = None) TimeSeriesCloudPredictor [source]#
Fit the predictor with SageMaker. This function will first upload necessary config and train data to s3 bucket. Then launch a SageMaker training job with the AutoGluon training container.
- Parameters
predictor_init_args (dict) – Init args for the predictor
predictor_fit_args (dict) – Fit args for the predictor
id_column (str) – Name of the ‘item_id’ column
timestamp_column (str) – Name of the ‘timestamp’ column
static_features (Optional[pd.DataFrame]) – An optional data frame describing the metadata attributes of individual items in the item index. For more detail, please refer to TimeSeriesDataFrame documentation: https://auto.gluon.ai/stable/api/autogluon.predictor.html#timeseriesdataframe
framework_version (str, default = latest) – Training container version of autogluon. If latest, will use the latest available container version. If provided a specific version, will use this version. If custom_image_uri is set, this argument will be ignored.
job_name (str, default = None) – Name of the launched training job. If None, CloudPredictor will create one with prefix ag-cloudpredictor
instance_type (str, default = 'ml.m5.2xlarge') – Instance type the predictor will be trained on with SageMaker.
instance_count (int, default = 1) – Number of instance used to fit the predictor.
volumes_size (int, default = 30) – Size in GB of the EBS volume to use for storing input data during training (default: 30). Must be large enough to store training data if File Mode is used (which is the default).
wait (bool, default = True) – Whether the call should wait until the job completes To be noticed, the function won’t return immediately because there are some preparations needed prior fit. Use get_fit_job_status to get job status.
backend_kwargs (dict, default = None) –
Any extra arguments needed to pass to the underneath backend. For SageMaker backend, valid keys are:
- autogluon_sagemaker_estimator_kwargs
Any extra arguments needed to initialize AutoGluonSagemakerEstimator Please refer to https://sagemaker.readthedocs.io/en/stable/api/training/estimators.html#sagemaker.estimator.Estimator for all options
- fit_kwargs
Any extra arguments needed to pass to fit. Please refer to https://sagemaker.readthedocs.io/en/stable/api/training/estimators.html#sagemaker.estimator.Estimator.fit for all options
- Return type
TimeSeriesCloudPredictor object. Returns self.