Skip to content
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

Unable to import config #100

Open
Rakshasv18 opened this issue Feb 2, 2024 · 4 comments
Open

Unable to import config #100

Rakshasv18 opened this issue Feb 2, 2024 · 4 comments

Comments

@Rakshasv18
Copy link

Rakshasv18 commented Feb 2, 2024

To reproduce :

  1. from rag.config import ROOT_DIR

Error :

ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from rag.config import ROOT_DIR

ModuleNotFoundError: No module named 'rag.config'

  1. Example shown in ipynb

Credentials

ray.init(runtime_env={
"env_vars": {
"OPENAI_API_BASE": os.environ["OPENAI_API_BASE"],
"OPENAI_API_KEY": os.environ["OPENAI_API_KEY"],
"ANYSCALE_API_BASE": os.environ["ANYSCALE_API_BASE"],
"ANYSCALE_API_KEY": os.environ["ANYSCALE_API_KEY"],
"DB_CONNECTION_STRING": os.environ["DB_CONNECTION_STRING"],
},
"working_dir": str(ROOT_DIR)
})

Gives the output :
Python version: 3.10.8
Ray version: 2.7.0
Dashboard: http://session-5ljni527x7edt2q6px7nuaejct.i.anyscaleuserdata-staging.com/

The output i get :

Python version: 3.9.15
Ray version: 2.9.1

I am not able to access that dashboard.

  1. Anyscale Platform access :
    I am trying to access the Anyscale Platform but it does say it needs invitation to progress but fails to send invitation to email , can you please share how to setup in Anyscale Platform.

  2. ! export EFS_DIR=$(python -c "from rag.config import EFS_DIR; print(EFS_DIR)")
    ! wget -e robots=off --recursive --no-clobber --page-requisites
    --html-extension --convert-links --restrict-file-names=windows
    --domains docs.ray.io --no-parent --accept=html --retry-on-http-error=429
    -P $EFS_DIR https://docs.ray.io/en/master/

Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'rag.config'
Both --no-clobber and --convert-links were specified, only --convert-links will be used.
--2024-02-01 19:48:54-- https://docs.ray.io/en/master/
Resolving docs.ray.io (docs.ray.io)... 104.18.1.163, 104.18.0.163
Connecting to docs.ray.io (docs.ray.io)|104.18.1.163|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
/mnt/shared_storage/ray-assistant-data/docs.ray.io/en/master: No such file or directory
/mnt/shared_storage/ray-assistant-data/docs.ray.io/en/master/index.html: No such file or directory

Cannot write to ‘/mnt/shared_storage/ray-assistant-data/docs.ray.io/en/master/index.html’ (Success).
Converted links in 0 files in 0 seconds.

@mriganktiwari
Copy link

Am facing the same issue, appreciate any help.

@Rakshasv18
Copy link
Author

@mriganktiwari I was able to re solve the first error wrt to config path :
here are the steps i followed :

import sys
import os

rag_module_path = os.path.abspath("path_to/rag_folder/")
sys.path.append(rag_module_path)

then import
from config import ROOT_DIR

and change rag.config to config in the code.

Initially this resolves but again to load the data i used the below command to run
! export EFS_DIR=$(python -c "from config import EFS_DIR; print(EFS_DIR)")
! wget -e robots=off --recursive --no-clobber --page-requisites
--html-extension --convert-links --restrict-file-names=windows
--domains docs.ray.io --no-parent --accept=html --retry-on-http-error=429
-P $EFS_DIR https://docs.ray.io/en/master/

but i get an error -

Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'config'
Both --no-clobber and --convert-links were specified, only --convert-links will be used.
--2024-02-03 09:17:10-- https://docs.ray.io/en/master/
Resolving docs.ray.io (docs.ray.io)... 104.18.1.163, 104.18.0.163
Connecting to docs.ray.io (docs.ray.io)|104.18.1.163|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
/mnt/shared_storage/ray-assistant-data/docs.ray.io/en/master: No such file or directory
/mnt/shared_storage/ray-assistant-data/docs.ray.io/en/master/index.html: No such file or directory

Cannot write to ‘/mnt/shared_storage/ray-assistant-data/docs.ray.io/en/master/index.html’ (Success).
Converted links in 0 files in 0 seconds.

@Shanoa00
Copy link

Hello~ I was facing the same problem and solved it by copying the folder named "rag" from the repo at the same level of the rag.ipynb notebook. Also, check the file located at rag/config.py to modify the location of the data that will be downloaded.

@rossdanlm
Copy link

Hey, running into same issue on Mac M1 because /mnt folder does not exist:

rossdan@Rossdans-MBP llm-applications % ls /mnt/shared_storage/ray-assistant-data
ls: /mnt/shared_storage/ray-assistant-data: No such file or directory
rossdan@Rossdans-MBP llm-applications % ls /mnt
ls: /mnt: No such file or directory

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

No branches or pull requests

4 participants