Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

ValueError: Model name MyModel was not found in search namespaces: ['InnerEye.ML.configs']. #818

Closed
Med-Rokaimi opened this issue Oct 26, 2022 Discussed in #817 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Med-Rokaimi
Copy link

Med-Rokaimi commented Oct 26, 2022

Discussed in #817

Originally posted by Med-Rokaimi October 26, 2022
Hey,
I'm trying to run Glaucoma detection model following the steps in the link
Sample task.
I set up the InnerEye-DeepLearningnner locally.
I created MyGlaucomaModel in the path (InnerEye/ML/configs), and my dataset folder is located in the same path as well.
This is the model I created:

class MyGlaucomaModel(GlaucomaPublic):
    def __init__(self) -> None:
        super().__init__()
        local_dataset=full_ml_test_data_path(),
        self.azure_dataset_id="glaucoma_detection",

When I try to run the model by this command:

python InnerEye/ML/runner.py --model=MyGlaucomaModel

I got this error:

Starting InnerEye runner at InnerEye/ML/runner.py
Adding InnerEye folder to sys.path: /home/ai/InnerEye-DeepLearning
Setting up logging to stdout.
Setting logging level to 20 (INFO)
2022-10-26T06:26:50Z INFO     rpdb is handling traps. To debug: identify the main runner.py process, then as root: kill -TRAP ; nc 127.0.0.1 4444
2022-10-26T06:26:50Z WARNING  (from attempt to import module InnerEye.ML.configs.MyGlaucoma): name 'full_ml_test_data_path' is not defined
2022-10-26T06:26:50Z WARNING  (from attempt to import module InnerEye.ML.configs.classification.GlaucomaPublic): name 'full_ml_test_data_path' is not defined
Traceback (most recent call last):
  File "InnerEye/ML/runner.py", line 467, in 
    main()
  File "InnerEye/ML/runner.py", line 461, in main
    run(project_root=fixed_paths.repository_root_directory(),
  File "InnerEye/ML/runner.py", line 457, in run
    return runner.run()
  File "InnerEye/ML/runner.py", line 215, in run
    self.parse_and_load_model()
  File "InnerEye/ML/runner.py", line 164, in parse_and_load_model
    config_or_container = model_config_loader.create_model_config_from_name(model_name=azure_config.model)
  File "/home/ai/InnerEye-DeepLearning/InnerEye/ML/utils/config_loader.py", line 132, in create_model_config_from_name
    raise ValueError(
ValueError: Model name MyGlaucomaModel was not found in search namespaces: ['InnerEye.ML.configs']

Can you please help me? I

AB#7873

@peterhessey peterhessey self-assigned this Oct 28, 2022
@peterhessey peterhessey added the bug Something isn't working label Oct 28, 2022
@peterhessey
Copy link
Contributor

Hi, I've managed to repeat this bug myself but I'm not sure on the exact cause yet, will take a closer look ASAP and get a bugfix to you soon :)

@Med-Rokaimi
Copy link
Author

The error has been fixed after solving the these two warnings:

2022-10-26T06:26:50Z WARNING  (from attempt to import module InnerEye.ML.configs.MyGlaucoma): name 'full_ml_test_data_path' is not defined
2022-10-26T06:26:50Z WARNING  (from attempt to import module InnerEye.ML.configs.classification.GlaucomaPublic): name 'full_ml_test_data_path' is not defined

The model is not loaded because of these two warnings.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants