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

Cannot import name ' configure_logger' #320

Closed
ING3TP2 opened this issue May 16, 2022 · 11 comments
Closed

Cannot import name ' configure_logger' #320

ING3TP2 opened this issue May 16, 2022 · 11 comments
Assignees
Labels

Comments

@ING3TP2
Copy link

ING3TP2 commented May 16, 2022

Hello, I am having the error: Cannot import name 'configure_logger' from 'anomalib.utils.loggers' while trying to run the following command :
python tools/train.py --config anomalib/models/padim/config.yaml
error coming from the file below
image

@ashwinvaidya17
Copy link
Collaborator

@ING3TP2 Are you on the development branch? How did you install anomalib in your environment?

@ING3TP2
Copy link
Author

ING3TP2 commented May 30, 2022

I'm sorry , now I can't even find the file train.py
I uninstalled the library and installed it again.
here's how I installed the library: 1- Pip Install anomalib --> Successfully installed anomalib-0.3.1
2- from the Windows Terminal command I accessed the path of library folder where I wanted
to open the tools folder and write the command ( python Train.py) but it tells me that
there's no such directory ( the tools directory )

@ashwinvaidya17
Copy link
Collaborator

I would suggest cloning the repo and installing using pip install -e . Let me know how that goes.

@ING3TP2
Copy link
Author

ING3TP2 commented May 30, 2022

image
Thank you so much, it has actually worked, but when it finished downloading the dataset and started to train, the PC crashed (I guess because of the large data) especially that I don't use GPU, so I had to shut it down. Actually I'm willing to train on a custom dataset, and as I read in the instructions to be able to train on a Custom Dataset, it's important first to configure the config.yaml file, so supposing I want to train the model PADIM on a custom dataset , am I supposed to modify the config.yaml in the Padim folder itself?

@ashwinvaidya17
Copy link
Collaborator

Glad to know that it worked! You can either modify the config file in Padim folder or you can pass the path to a new config file using --config flag in train.py

@ING3TP2
Copy link
Author

ING3TP2 commented May 30, 2022

Thank you ! I have changed the config file, and I guess I have some issues in the library omegaconf and in init.py file in data folder, based on these errors..
image
when I checked init.py file in data folder I found problems in these libraries :
image
even after installing the omegaconf package, nothing has changed

@samet-akcay
Copy link
Contributor

@ING3TP2, can you share your config file?

@ashwinvaidya17
Copy link
Collaborator

Ah! The readme needs to be updated. Try using keys normal_dir, abnormal_dir and normal_test_dir: None. Instead of normal:,
abnormal: in the config.yaml

@ING3TP2
Copy link
Author

ING3TP2 commented May 31, 2022

@ashwinvaidya17 Thank you it was indeed the problem, but I guess some other keys should be changed referring to this error :
image
image

@ING3TP2
Copy link
Author

ING3TP2 commented May 31, 2022

@samet-akcay I didn't really know how to share the file so here's the changements tht are made
image

@ashwinvaidya17
Copy link
Collaborator

@ING3TP2 This PR has been merged to development #338. Can you confirm if these changes address your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants