question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe the bug

  • Runtime error at training “”

To Reproduce

Steps to reproduce the behavior:

No changes were made to the provided Colab workbook:

Open In Colab by @bth5

Expected behaviour

  • I ran the exact same sequence of commands on Google Colab and was able to compile multiple models (padim & cflow) and achieve various inferences from the trained model.
  • Command run:
!python tools/train.py --config anomalib/models/padim/config.yaml

ERROR response when running training command:

Traceback (most recent call last): File “tools/train.py”, line 71, in <module> train() File “tools/train.py”, line 49, in train config = get_configurable_parameters(model_name=args.model, config_path=args.config) File “/usr/local/lib/python3.7/dist-packages/anomalib/config/config.py”, line 160, in get_configurable_parameters config.metrics.threshold.pixel_default = config.metrics.threshold.image_default File “/usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py”, line 356, in getattr key=key, value=None, cause=e, type_override=ConfigAttributeError File “/usr/local/lib/python3.7/dist-packages/omegaconf/base.py”, line 237, in _format_and_raise type_override=type_override, File “/usr/local/lib/python3.7/dist-packages/omegaconf/_utils.py”, line 900, in format_and_raise _raise(ex, cause) File “/usr/local/lib/python3.7/dist-packages/omegaconf/_utils.py”, line 798, in _raise raise ex.with_traceback(sys.exc_info()[2]) # set env var OC_CAUSE=1 for full trace File “/usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py”, line 352, in getattr key=key, default_value=DEFAULT_MARKER, validate_key=False File “/usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py”, line 443, in _get_impl key=key, throw_on_missing_key=True, validate_key=validate_key File “/usr/local/lib/python3.7/dist-packages/omegaconf/basecontainer.py”, line 78, in _get_child throw_on_missing_key=throw_on_missing_key, File “/usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py”, line 480, in _get_node raise ConfigKeyError(f"Missing key {key!s}") omegaconf.errors.ConfigAttributeError: Missing key image_default full_key: metrics.threshold.image_default object_type=dict

Hardware and Software Configuration

  • GOOGLE COLAB
  • Python 3 Google Compute Engine backend (GPU)
  • [standard Colab account specs as of 2022-10-19]

Additional context

  • The suggested fix is to install an older version “omegaconf==2.0.0”, however, this leads to a new error.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
samet-akcaycommented, Oct 20, 2022

@ANTZ314, this is probably due to one of our recent PRs #637. I’ll check the notebooks and fix them if needed.

0reactions
samet-akcaycommented, Oct 21, 2022

@ANTZ314, @JACKYNIKK, the problem is that the jupyter notebook installs anomalib via pip, which installs v0.3.6 now. You clone the repo via !git clone https://github.com/openvinotoolkit/anomalib.git, which clones the latest commit, and causes conflict with the pypi version.

Solution For now, if you clone and install anomalib as the following, the problem would temporarily be resolved.

Option - 1 Train the model via

!python tools/train.py --model padim

Option - 2 Install the library locally

!git clone https://github.com/openvinotoolkit/anomalib.git
%cd anomalib
!pip install -e .

We’ll soon update the pypi version with v0.3.7, which would remedy this issue completely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Training and Testing Errors - CMU Statistics
Estimating test error. Often, we want an accurate estimate of the test error of our method (e.g., linear regression). Why? Two main purposes:....
Read more >
What are the “training error” and “test error” used in deep ...
Training error is simply an error that occurs during model training, i.e. dataset inappropriately handle during preprocessing or in feature ...
Read more >
What is a training and test error? - Quora
Training error is the error that you get when you run the trained model back on the training data. Remember that this data...
Read more >
Assessing the Performance (Types and Sources of Error) in ...
The training error is defined as the average loss that occurred during the training process. It is given by: Here, m_t is the...
Read more >
Training Error - an overview | ScienceDirect Topics
We noted in Section 2.1 that the central aim of ML is to learn a model which can generalize effectively to unseen data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found