Azure / Azure/azureml-examples

azureml.rag.utils.deployment: No module named 'openai.api_resources'

Open
#2,903 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
2k
Forks
1.7k
Avg merge
18h 18m
Merged PRs (30d)
2

Description

### Operating System

Linux

### Version Information

python 3.8
azureml-0.2.7

### Steps to reproduce

Follow steps in https://github.com/Azure/azureml-examples/blob/main/sdk/python/generative-ai/rag/notebooks/faiss/scheduled_update_faiss_index.ipynb
Run the rag deployment part: `from azureml.rag.utils.deployment import infer_deployment`
It reports error: ModuleNotFoundError: No module named 'openai.api_resources'
It seems `openai.api_resources` has been deprecated.

### Expected behavior

No error

### Actual behavior

ModuleNotFoundError: No module named 'openai.api_resources'

### Addition information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the scheduled_update_faiss_index.ipynb notebook and reproduce the RAG deployment step that imports infer_deployment from azureml.rag.utils.deployment. Trace that import to the dependency reference for openai.api_resources and check the installed package versions listed in the issue. Done means the deployment import runs without ModuleNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, jupyter-notebook, python
Domain
cloud, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.