- Newest
- Most votes
- Most comments
For training and tuning, you provide the train_features.csv file to the container through the input channel when you call the .fit() method. The file is downloaded from S3 and put into the /opt/ml/input/data/train/train_features.csv location. After training is completed, only /opt/ml/model will be exported to S3 as model artificats.
During model deployment, a brand new host is provisioned and model artifacts are downloaded to /opt/ml/model . However, your train_features.csv file will not be available to the host because it does not know about it. You will need to get it from S3 and put in the expected location /opt/ml/input/data/train/train_features.csv . You can use an inference.py script to write a function that downloads the file from S3 before your model is loaded. Please have a look at this example for XGBoost.
Hope it helps.
Relevant content
- asked 2 years ago
- asked 5 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 10 months ago
