Skip to content

Cannot compile xgboost-neo model in sagemaker 2.11.0 (neo-xgboost.json file not found) #1932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
splat-ef opened this issue Sep 30, 2020 · 4 comments

Comments

@splat-ef
Copy link

splat-ef commented Sep 30, 2020

I'm following the tutorial on churn from this link: https://github.com/awslabs/amazon-sagemaker-examples/blob/master/introduction_to_applying_machine_learning/xgboost_customer_churn/xgboost_customer_churn.ipynb. I installed sagemaker 2.11 and tweaked the code to handle the breaking changes from v1.

I was able to train the xgboost model but struggle to compile the neo version. I tried to run this code:

output_path = '/'.join(xgb.output_path.split('/')[:-1])
compiled_model = xgb.compile_model(target_instance_family='ml_m4', 
                                   input_shape={'data': [1, 69]},
                                   role=role,
                                   framework='xgboost',
                                   framework_version='latest',
                                   output_path=output_path)

I get this error:

FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/lib/python3.7/site-packages/sagemaker/image_uri_config/neo-xgboost.json'

From https://github.com/aws/sagemaker-python-sdk/tree/master/src/sagemaker/image_uri_config, I found xgboost-neo.json instead of neo-xgboost.json. I wonder if this is just a case of a name change that would need to be updated in the code? Or should I need to do something else?

@metrizable
Copy link
Contributor

Hello @splat-ef

Thanks again for contacting us. The fix was merged. Let us know if there's anything else we can help with.

Best regards

@Ayushi96
Copy link

Ayushi96 commented Nov 8, 2020

I'm following the tutorial on churn from this link: https://github.com/awslabs/amazon-sagemaker-examples/blob/master/introduction_to_applying_machine_learning/xgboost_customer_churn/xgboost_customer_churn.ipynb. I installed sagemaker 2.11 and tweaked the code to handle the breaking changes from v1.

I was able to train the xgboost model but struggle to compile the neo version. I tried to run this code:

output_path = '/'.join(xgb.output_path.split('/')[:-1])
compiled_model = xgb.compile_model(target_instance_family='ml_m4', 
                                   input_shape={'data': [1, 69]},
                                   role=role,
                                   framework='xgboost',
                                   framework_version='latest',
                                   output_path=output_path)

I get this error:

FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/lib/python3.7/site-packages/sagemaker/image_uri_config/neo-xgboost.json'

From https://github.com/aws/sagemaker-python-sdk/tree/master/src/sagemaker/image_uri_config, I found xgboost-neo.json instead of neo-xgboost.json. I wonder if this is just a case of a name change that would need to be updated in the code? Or should I need to do something else?

I am new to Sagemaker service, could you please tell me how can we navigate to s3 and see the name of the json file ??

@johnellliott
Copy link

For others running into trouble accessing built-in images URIs and associated json files, try running 'conda install -c conda-forge sagemaker-python-sdk' on the terminal to install the local file system dependencies. This resolved my FileNotFoundError accessing xgboost.json and debugger.json.

@martinRenou
Copy link
Collaborator

Closing as resolved. Feel free to reopen/continue the discussion if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants