aws / aws/sagemaker-python-sdk

Support batch transform job for Model entity with container definitions which use ModelDataSource attribute (especially autogluon foundation jump start model)

Aperta
#5,160 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub
component: jumpstart type: feature request
Lingua principale
Python
Stelle
2.3k
Fork
1.3k
Merge medio
1g 22h
PR unite (30g)
35

Descrizione

**Describe the feature you'd like**
I would like to support batch transform job for Model entity with container definitions which use ModelDataSource attribute. I am particularly interested in supporting the jump start foundation autogluon chronos model, but it seems that the problem is broader and affects all models, with container definitions which use ModelDataSource attribute (and have not defined "ModelDataUrl" attribute)

**How would this feature be used? Please describe.**
I would expect that below code will create properly batch transform job for autogluon chronos model.
```python
from sagemaker.jumpstart.model import JumpStartModel
model = JumpStartModel(model_id='autogluon-forecasting-chronos-t5-base')
transformer = model.transformer(instance_type='ml.m5.large', instance_count=1)
transformer.transform('s3://some-bucket/')
```
Currently the above code returns the below error suggesting that for some reason models that use container deifinitions which use "ModelDataSource" (and probably transform batch job expect "ModelDataUrl") are not supported by Batch transform job.
```
ClientError: An error occurred (ValidationException) when calling the CreateTransformJob operation: SageMaker Batch
currently doesn't support Model entity with container definitions which use ModelDataSource attribute
```
**Describe alternatives you've considered**
Nothing

**Additional context**
I found the workaround to the problem by gzipping the autogluon forecasting chronos model, and define model by providing model_data in compressed form. Then the ModelDataUrl attribute of container is defined and the batch transform job can be created properly. For some reason when model_data is not provided in gzipped form the ModelDataUrl container attribute is not defined and there does not seem to be any tools to define this attribute manually.

I don't know where exactly the problem lies, whether in the fact that in the case of non-gzipped models the ModelDataUrl container attribute is undefined, or in the fact that the batch transformer job cannot properly copy model files that are not compressed for some reason. Either way, it seems that it could be easy resolved on aws side.

The easiest solution to the problem is to prepare all jump start models in gzipped form, but it is probably better to solve the problem more broadly so that the batch transform job can support models that have not been gzipped.

It is related to the issue: https://github.com/aws/sagemaker-python-sdk/issues/4777

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reproducing the JumpStartModel transformer.transform flow for autogluon-forecasting-chronos-t5-base and inspect the CreateTransformJob request involving ModelDataSource and ModelDataUrl. Read related issue #4777 and confirm what changes are possible in the SDK versus the SageMaker service; done means the example creates a batch transform job without gzipping model data.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, python
Ambito
cloud, machine-learning
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.