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

Resolving python package errors #4

Closed
JosephKJ opened this issue Mar 7, 2021 · 2 comments
Closed

Resolving python package errors #4

JosephKJ opened this issue Mar 7, 2021 · 2 comments

Comments

@JosephKJ
Copy link
Contributor

JosephKJ commented Mar 7, 2021

Hi, thanks for this awesome library.

When I tried running

python utils/main.py --model=icarl --dataset=seq-cifar10 --buffer_size=500

I got the following error:

joseph@machine:~/workspace/mammoth$ python utils/main.py --model=icarl --dataset=seq-cifar10 --buffer_size=500
Traceback (most recent call last):
  File "utils/main.py", line 7, in <module>
    from datasets import NAMES as DATASET_NAMES
ImportError: cannot import name 'NAMES'

I could resolve this by adding:

import os
import sys
conf_path = os.getcwd()
sys.path.append(conf_path)
sys.path.append(conf_path + '/datasets')
sys.path.append(conf_path + '/backbone')
sys.path.append(conf_path + '/models')

to mammoth/utils/main.py.

I have updated my fork with it.

I just thought of brining it up here, so that no one else might fret around this issue.

Thanks!

@mbosc
Copy link
Collaborator

mbosc commented Mar 7, 2021

Yes, you're not the first to get that issue either. We usually solve it by setting PYTHONPATH=<MAMMOTH_ROOT_FOLDER> manually before launching main.py, but I reckon your config does that automatically.
Feel free to open a pull request, I'll merge it!

Also, if you feel like adding methods to our library (we'd love to have your Merlin :D) additions and pull requests are absolutely welcome!

@JosephKJ
Copy link
Contributor Author

JosephKJ commented Mar 7, 2021

Thank you Matteo. Sure, I will work on Merlin a while later :) I have created a PR for this issue now.

@mbosc mbosc closed this as completed Mar 7, 2021
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

2 participants