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

setup.py not copying config files into d2go/configs directory #174

Open
TannerGilbert opened this issue Feb 8, 2022 · 6 comments
Open
Labels
bug Something isn't working

Comments

@TannerGilbert
Copy link
Contributor

Instructions To Reproduce the 🐛 Bug:

When running D2Go in Google Colab the setup.py file doesn't copy the configs directory from the d2go folder into the d2go/d2go folder correctly, which leads to the following error when trying to load the model.

RuntimeError: <config path> not available in Model Zoo!

This error comes from the the get_config_file method that attempts to load the config file from the d2go/d2go/configs folder.

def get_config_file(config_path):
"""
Returns path to a builtin config file.
Args:
config_path (str): config file name relative to d2go's "configs/"
directory, e.g., "COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml"
Returns:
str: the real path to the config file.
"""
cfg_file = pkg_resources.resource_filename(
"d2go", os.path.join("configs", config_path)
)
if not os.path.exists(cfg_file):
raise RuntimeError("{} not available in Model Zoo!".format(config_path))
return cfg_file

After adding some debug code the method I found out the the configs folder doesn't exist after installing d2go but until now I was unable to find the cause of this error. I suspect that it's caused by the setup.py file and the changes made in c12469c though.

Also the setup.py file from Detectron2 looks almost identical but there the copying of the configs is working without any issues.

Any suggestions are greatly appreciated.

Related issues:

@TannerGilbert TannerGilbert added the bug Something isn't working label Feb 8, 2022
@TannerGilbert
Copy link
Contributor Author

Also I think

d2go/setup.py

Line 61 in 5aadaaa

config_paths = glob.glob(os.path.join(file_path + extension), recursive=True)
should be replaced with:

config_paths = glob.glob(os.path.join(file_path, extension), recursive=True)

@dipu0
Copy link

dipu0 commented Mar 6, 2023

facing same problem!!

@Srini138
Copy link

Still facing same problem in google colab. Is there any solution for this.
Note : The very first time i didn't get any issues it works fine and model gets train after some time i tried to train the model I am facing this issue

@wat3rBro
Copy link
Contributor

@Srini138 @dipu0 Does @TannerGilbert 's fix work for you?

@Srini138
Copy link

@Srini138 @dipu0 Does @TannerGilbert 's fix work for you?

No I didn't try @TannerGilbert fix. I just copy pasted configs folder inside this folder "usr/local/lib/python3.9/dist-packages/d2go" in colab the model runs fine without any error for me

@greg007-web
Copy link

@Srini138 @dipu0 Does @TannerGilbert 's fix work for you?

No I didn't try @TannerGilbert fix. I just copy pasted configs folder inside this folder "usr/local/lib/python3.9/dist-packages/d2go" in colab the model runs fine without any error for me

How did you do this?? Can be more clear, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants