amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

fix: Slight improvements on step decorator and notebook job step notebooks

Open qidewenwhen opened this issue 4 months ago • 41 comments

Issue #, if available:

The basic-pipeline-batch-inference.ipynb notebook failed in the distribution image for the version conflicts:

ValueError: Mismatched version between the Python package and the native shared object.  Python package version: 1.7.1. Shared object version: 1.7.6. Shared object is loaded from: /opt/conda/lib/libxgboost.so.
Likely cause:
  * XGBoost is first installed with anaconda then upgraded with pip. To fix it please remove one of the installations.

To fix it, we should update the xgboost version restriction to be xgboost>=1.7.1 in requirements.txt and allow auto version upgrade while installing dependencies in requirements.txt.

Description of changes: Slight improvements on step decorator and notebook job step notebooks including:

  1. Update notebooks to consume latest sdk: %pip install -r ./requirements.txt -U
  2. Update the xgboost version in the requirements.txt in batch notebook to be xgboost>=1.7.1 to fix version conflicts in cosmos image
  3. Update gitignore to ignore the notebook output files
  4. Rephrase the words in the Setup section in notebook job step notebook as it's confusing

Testing done: notebook tests

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • [X] I have read the CONTRIBUTING doc and adhered to the example notebook best practices
  • [X] I have updated any necessary documentation, including READMEs
  • [X] I have tested my notebook(s) and ensured it runs end-to-end
  • [X] I have linted my notebook(s) and code using black-nb -l 100 {path}/{notebook-name}.ipynb

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

qidewenwhen avatar Feb 23 '24 00:02 qidewenwhen