create_retraining_scheduler
¶
create_retraining_scheduler(
model_name: ModelName,
retraining_frequency: RetrainingFrequency,
lookback_window: LookbackWindow,
client_token: IdempotenceToken,
*,
config_overrides: Optional[LookoutEquipmentClientConfig] = None,
retraining_start_date: Optional[Timestamp] = None,
promote_mode: Optional[ModelPromoteMode] = None,
) -> CreateRetrainingSchedulerResponse
Creates a retraining scheduler on the specified model.
Parameters:
-
model_name(ModelName) –The name of the model to add the retraining scheduler to.
-
retraining_start_date(Optional[Timestamp], default:None) –The start date for the retraining scheduler. Lookout for Equipment truncates the time you provide to the nearest UTC day.
-
retraining_frequency(RetrainingFrequency) –This parameter uses the ISO 8601 standard to set the frequency at which you want retraining to occur in terms of Years, Months, and/or Days (note: other parameters like Time are not currently supported). The minimum value is 30 days (P30D) and the maximum value is 1 year (P1Y). For example, the following values are valid:
-
P3M15D – Every 3 months and 15 days
-
P2M – Every 2 months
-
P150D – Every 150 days
-
-
lookback_window(LookbackWindow) –The number of past days of data that will be used for retraining.
-
promote_mode(Optional[ModelPromoteMode], default:None) –Indicates how the service will use new models. In
MANAGEDmode, new models will automatically be used for inference if they have better performance than the current model. InMANUALmode, the new models will not be used until they are manually activated. -
client_token(IdempotenceToken) –A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.
Raises:
-
AccessDeniedException–The request could not be completed because you do not have access to the resource.
-
ConflictException–The request could not be completed due to a conflict with the current state of the target resource.
-
InternalServerException–Processing of the request has failed because of an unknown error, exception or failure.
-
ResourceNotFoundException–The resource requested could not be found. Verify the resource ID and retry your request.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Creates a retraining scheduler with a specific start date
>>> client.create_retraining_scheduler(model_name='sample-model', retraining_start_date='2024-01-01T00:00:00Z', retraining_frequency='P1M', lookback_window='P360D', client_token='sample-client-token')
Creates a retraining scheduler with manual promote mode
>>> client.create_retraining_scheduler(model_name='sample-model', retraining_frequency='P1M', lookback_window='P360D', promote_mode='MANUAL', client_token='sample-client-token')
Source code in docs_src/capo_lookoutequipment/_services/lookout_equipment.py
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 | |