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.

model training with custom dataset

See original GitHub issue

Hello, When I am starting the training model with custom dataset , I got this problem. I face this issue first time. Can you help me?

thanks,

(env) (base) zeynep_automi_ai@anomalib:~/zeynep/anomalib$ python tools/train.py --config anomalib/models/padim/config_orange.yaml /home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/pytorch_lightning/utilities/cli.py:95: LightningDeprecationWarning: LightningCLI’s registries were deprecated in v1.7 and will be removed in v1.9. Now any imported subclass is automatically available by name in LightningCLI without any need to explicitly register it. rank_zero_deprecation(_deprecate_registry_message) /home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/pytorch_lightning/utilities/cli.py:95: LightningDeprecationWarning: LightningCLI’s registries were deprecated in v1.7 and will be removed in v1.9. Now any imported subclass is automatically available by name in LightningCLI without any need to explicitly register it. rank_zero_deprecation(_deprecate_registry_message) 2022-08-03 12:40:42,241 - pytorch_lightning.utilities.seed - INFO - Global seed set to 42 2022-08-03 12:40:42,242 - anomalib.data - INFO - Loading the datamodule 2022-08-03 12:40:42,244 - anomalib.models - INFO - Loading the model. 2022-08-03 12:40:42,389 - torch.distributed.nn.jit.instantiator - INFO - Created a temporary directory at /tmp/tmpm7a9yqli 2022-08-03 12:40:42,390 - torch.distributed.nn.jit.instantiator - INFO - Writing /tmp/tmpm7a9yqli/_remote_module_non_sriptable.py 2022-08-03 12:40:42,400 - anomalib.models.components.base.anomaly_module - INFO - Initializing PadimLightning model. /home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/torchmetrics/utilities/prints.py:36: UserWarning: Torchmetrics v0.9 introduced a new argument class property called full_state_update that has not been set for this class (AdaptiveThreshold). The property determines if update by default needs access to the full metric state. If this is not the case, significant speedups can be achieved and we recommend setting this to False. We provide an checking function from torchmetrics.utilities import check_forward_no_full_state that can be used to check if the full_state_update=True (old and potential slower behaviour, default for now) or if full_state_update=False can be used safely.

warnings.warn(*args, **kwargs) /home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/torchmetrics/utilities/prints.py:36: UserWarning: Metric PrecisionRecallCurve will save all targets and predictions in buffer. For large datasets this may lead to large memory footprint. warnings.warn(*args, **kwargs) /home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/torchmetrics/utilities/prints.py:36: UserWarning: Torchmetrics v0.9 introduced a new argument class property called full_state_update that has not been set for this class (AnomalyScoreDistribution). The property determines if update by default needs access to the full metric state. If this is not the case, significant speedups can be achieved and we recommend setting this to False. We provide an checking function from torchmetrics.utilities import check_forward_no_full_state that can be used to check if the full_state_update=True (old and potential slower behaviour, default for now) or if full_state_update=False can be used safely.

warnings.warn(*args, **kwargs) /home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/torchmetrics/utilities/prints.py:36: UserWarning: Torchmetrics v0.9 introduced a new argument class property called full_state_update that has not been set for this class (MinMax). The property determines if update by default needs access to the full metric state. If this is not the case, significant speedups can be achieved and we recommend setting this to False. We provide an checking function from torchmetrics.utilities import check_forward_no_full_state that can be used to check if the full_state_update=True (old and potential slower behaviour, default for now) or if full_state_update=False can be used safely.

warnings.warn(*args, **kwargs) 2022-08-03 12:40:42,931 - anomalib.utils.loggers - INFO - Loading the experiment logger(s) 2022-08-03 12:40:42,932 - anomalib.utils.callbacks - INFO - Loading the callbacks /home/zeynep_automi_ai/zeynep/anomalib/anomalib/utils/callbacks/init.py:162: UserWarning: log_images_to parameter is deprecated and will be removed in version 0.3.4. Please use the visualization.log_images and visualization.save_images parameters instead. warnings.warn( Traceback (most recent call last): File “/home/zeynep_automi_ai/zeynep/anomalib/tools/train.py”, line 82, in <module> train() File “/home/zeynep_automi_ai/zeynep/anomalib/tools/train.py”, line 67, in train callbacks = get_callbacks(config) File “/home/zeynep_automi_ai/zeynep/anomalib/anomalib/utils/callbacks/init.py”, line 112, in get_callbacks add_visualizer_callback(callbacks, config) File “/home/zeynep_automi_ai/zeynep/anomalib/anomalib/utils/callbacks/init.py”, line 168, in add_visualizer_callback if “local” in config.project.log_images_to: File “/home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/omegaconf/dictconfig.py”, line 357, in getattr self._format_and_raise( File “/home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/omegaconf/base.py”, line 231, in _format_and_raise format_and_raise( File “/home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/omegaconf/_utils.py”, line 873, in format_and_raise _raise(ex, cause) File “/home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/omegaconf/_utils.py”, line 771, in _raise raise ex.with_traceback(sys.exc_info()[2]) # set env var OC_CAUSE=1 for full trace File “/home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/omegaconf/dictconfig.py”, line 353, in getattr return self._get_impl( File “/home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/omegaconf/dictconfig.py”, line 444, in _get_impl node = self._get_child( File “/home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/omegaconf/basecontainer.py”, line 73, in _get_child child = self._get_node( File “/home/zeynep_automi_ai/zeynep/env/lib/python3.9/site-packages/omegaconf/dictconfig.py”, line 482, in _get_node raise ConfigKeyError(f"Missing key {key!s}") omegaconf.errors.ConfigAttributeError: Missing key log_images_to full_key: project.log_images_to object_type=dict

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ZeynepRuveydacommented, Aug 3, 2022
0reactions
ashwinvaidya17commented, Aug 3, 2022

I think the issue you are facing is because the configuration for logging images has changed in this PR https://github.com/openvinotoolkit/anomalib/pull/390. Since you are using a custom configuration, you will have to update it to something similar

visualization:
  show_images: False # show images on the screen
  save_images: True # save images to the file system
  log_images: True # log images to the available loggers (if any)
  image_save_path: null # path to which images will be saved
  mode: full # options: ["full", "simple"]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom training: walkthrough | TensorFlow Core
This tutorial shows you how to train a machine learning model with a custom training loop ... Import a dataset; Build a simple...
Read more >
Train Custom Data · ultralytics/yolov5 Wiki - GitHub
1. Create Dataset. YOLOv5 models must be trained on labelled data in order to learn classes of objects in that data. · 2....
Read more >
How to Train YOLO v5 on a Custom Dataset - Paperspace Blog
This tutorial will show you how to implement and train YOLOv5 on your own custom dataset. Full Python code included.
Read more >
Training YOLOv5 custom dataset with ease - Medium
It is fast, has high accuracy and is incredibly easy to train. In this story, we talk about the YOLOv5 models training using...
Read more >
How to Train A Custom Object Detection Model with YOLO v5
Training Custom YOLOv5 Detector · img: define input image size · batch: determine batch size · epochs: define the number of training epochs....
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