Skip to content
Advertisement

entry_point file using XGBoost as a framework in sagemaker

Looking at the following source code taken from here (SDK v2):

JavaScript

I wonder where the your_xgboost_abalone_script.py file has to be placed please? So far I used XGBoost as a built-in algorithm from my local machine with similar code (i.e. I span up a training job remotely). Thanks!

PS:

Looking at this, and source_dir, I wonder if one can upload Python files to S3. In this case, I take it is has to be tar.gz? Thanks!

Advertisement

Answer

your_xgboost_abalone_script.py can be created locally. The path you provide is relative to where the code is running.

I.e. your_xgboost_abalone_script.py can be located in the same directory where you are running the SageMaker SDK (“source code”).

For example if you have your_xgboost_abalone_script.py in the same directory as the source code:

JavaScript

Then you can point to this file exactly how the documentation depicts:

JavaScript

The SDK will take your_xgboost_abalone_script.py repackage it into a model tar ball and upload it to S3 on your behalf.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement