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

🐞 v1 - Issues when validation and test split modes are set to 'none' #1629

Open
1 task done
willyfh opened this issue Jan 12, 2024 · 0 comments · May be fixed by #1703
Open
1 task done

🐞 v1 - Issues when validation and test split modes are set to 'none' #1629

willyfh opened this issue Jan 12, 2024 · 0 comments · May be fixed by #1703

Comments

@willyfh
Copy link
Contributor

willyfh commented Jan 12, 2024

Describe the bug

  • When val_split_mode is set to none > Error: datamodule object has no attribute 'val_data'
  • When test_split_mode is set to none > the test stage is not skipped

Dataset

Other (please specify in the text field below)

Model

Other (please specify in the field below)

Steps to reproduce the behavior

Set val_split_mode or test_split_mode to NONE in a config data file, then start the training process using the config file.

OS information

Expected behavior

when NONE is set to either val_split_mode or test_split_mode, the corresponding stage should be skipped.

Screenshots

No response

Pip/GitHub

pip

What version/branch did you use?

v1

Configuration YAML

class_path: anomalib.data.Kolektor
init_args:
  root: "./datasets/kolektor"
  image_size: [256, 256]
  center_crop: null
  normalization: imagenet
  train_batch_size: 32
  eval_batch_size: 32
  num_workers: 8
  transform_config_train: null
  transform_config_eval: null
  test_split_mode: NONE
  test_split_ratio: 0.2
  val_split_mode: NONE
  val_split_ratio: 0.5
  seed: null

Logs

│ /media/willy/Windows/data_ubuntu/anomalib/anomalib/src/anomalib/data/base/datamodule.py:198 in   │
│ val_dataloader                                                                                   │
│                                                                                                  │
│   195 │   def val_dataloader(self) -> EVAL_DATALOADERS:                                          │
│   196 │   │   """Get validation dataloader."""                                                   │
│   197 │   │   return DataLoader(                                                                 │
│ ❱ 198 │   │   │   dataset=self.val_data,                                                         │
│   199 │   │   │   shuffle=False,                                                                 │
│   200 │   │   │   batch_size=self.eval_batch_size,                                               │
│   201 │   │   │   num_workers=self.num_workers,                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'Kolektor' object has no attribute 'val_data'

Code of Conduct

  • I agree to follow this project's Code of Conduct
@willyfh willyfh changed the title [Bug]: v1 - Issues when validation and test split modes are set to 'none' 🐞 v1 - Issues when validation and test split modes are set to 'none' Jan 14, 2024
@willyfh willyfh linked a pull request Feb 1, 2024 that will close this issue
9 tasks
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

Successfully merging a pull request may close this issue.

1 participant