Skip to content

Fix blbooksgenre notebook failures due to error on deployment#3353

Merged
imatiach-msft merged 1 commit intomainfrom
ilmat/fix-blbooksgenre
Aug 19, 2024
Merged

Fix blbooksgenre notebook failures due to error on deployment#3353
imatiach-msft merged 1 commit intomainfrom
ilmat/fix-blbooksgenre

Conversation

@imatiach-msft
Copy link
Copy Markdown
Contributor

@imatiach-msft imatiach-msft commented Aug 19, 2024

Description

Fix blbooksgenre notebook failures due to error on deployment

Seeing error on deployment in notebook:

  File "/opt/miniconda/envs/userenv/lib/python3.9/site-packages/azureml_inference_server_http/server/user_script.py", line 77, in load_script
    main_module_spec.loader.exec_module(user_module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/var/mlflow_resources/mlflow_score_script.py", line 378, in <module>
    model = load_model(model_path)
  File "/opt/miniconda/envs/userenv/lib/python3.9/site-packages/mlflow/tracing/provider.py", line 237, in wrapper
    is_func_called, result = True, f(*args, **kwargs)
  File "/opt/miniconda/envs/userenv/lib/python3.9/site-packages/mlflow/pyfunc/__init__.py", line 1027, in load_model
    model_impl = importlib.import_module(conf[MAIN])._load_pyfunc(data_path)
  File "/opt/miniconda/envs/userenv/lib/python3.9/site-packages/mlflow/pyfunc/model.py", line 550, in _load_pyfunc
    context, python_model, signature = _load_context_model_and_signature(model_path, model_config)
  File "/opt/miniconda/envs/userenv/lib/python3.9/site-packages/mlflow/pyfunc/model.py", line 533, in _load_context_model_and_signature
    python_model = cloudpickle.load(f)
AttributeError: Can't get attribute 'BertSdpaSelfAttention' on <module 'transformers.models.bert.modeling_bert' from '/opt/miniconda/envs/userenv/lib/python3.9/site-packages/transformers/models/bert/modeling_bert.py'>

This seems to be related to a new class added to the package which breaks backcompat:
huggingface/transformers#28802

The fix is to increase the bounds on the huggingface transformers pypi package to latest.

Checklist

  • I have read the contribution guidelines.
  • I have coordinated with the docs team (mldocs@microsoft.com) if this PR deletes files or changes any file names or file extensions.
  • Pull request includes test coverage for the included changes.
  • This notebook or file is added to the CODEOWNERS file, pointing to the author or the author's team.

@imatiach-msft imatiach-msft merged commit 4ac0485 into main Aug 19, 2024
@imatiach-msft imatiach-msft deleted the ilmat/fix-blbooksgenre branch August 19, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants