Skip to content

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

Closed

Description

@splat-ef

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?

Activity

  1. metrizable commented on Oct 6, 2020

    @metrizable
    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

  2. Ayushi96 commented on Nov 8, 2020

    @Ayushi96

    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 ??

  3. johnellliott commented on Jun 7, 2021

    @johnellliott

    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.

  4. martinRenou commented on Sep 27, 2023

    @martinRenou
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions