Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Bug] Benchmarking tool running immediately and not producing any output #1116

Closed
davidlauerman opened this issue Jun 8, 2023 · 2 comments
Closed
Assignees

Comments

@davidlauerman
Copy link

davidlauerman commented Jun 8, 2023

I am having issues running the benchmarking tool, I am not sure if this is something that has been encountered. In the terminal, I am inputting :
python tools/benchmarking/benchmark.py --config tools/benchmarking/benchmark_params.yaml
and receiving as an output almost immediately (about 2 seconds in total):
Benchmarking started 🏃‍♂️. This will take a while ⏲ depending on your configuration. 2023-06-08 15:31:28,554 - /app/myanomalib/anomalib/tools/benchmarking/benchmark.py - WARNING - Config requested GPU benchmarking but torch could not detect any cuda enabled devices Finished gathering results ⚡
This is my benchmark_params.yaml file content:

seed: 42
compute_openvino: false
hardware:
  - gpu
writer:
  - wandb
grid_search:
  dataset:
    name: hazelnut
    format: folder
    root: {str(root_directory / "datasets" / "hazelnut_toy")}
    normal_dir: good # name of the folder containing normal images.
    abnormal_dir: colour # name of the folder containing abnormal images.
    normal_test_dir: null
    task: segmentation # classification or segmentation
    mask: /anomalib/datasets/hazelnut_toy/mask/colour
    extensions: .jpg
    split_ratio: 0.2
    category:
      - colour
      - crack
    image_size: [128, 256]
  model_name:
    - padim
    - stfpm

I am just hoping to get some sort of output, but as of right now there is nothing and so I am not sure where to start. I have not changed anything else outside of this file, I have been just working my way through the 'Training with Custom Data' tutorial. I am running this all in a docker container that is almost identical to the developer container in the git repository. Let me know if anything seems familiar here or anything jumps out. Thanks!

@blaz-r
Copy link
Contributor

blaz-r commented Jun 27, 2023

Hello @davidlauerman.
The error says you don't have cuda enabled gpus on your system. Can you verify that you have proper version of torch, that also includes cuda support?

@blaz-r
Copy link
Contributor

blaz-r commented Jun 27, 2023

Even after this. Your config doesn't look quite right. Currently there is a discrepancy between docs, code and notebooks, so this should be fixed. The same issue also occurred in #1109. I believe @ashwinvaidya17, as the author of benchmark, knows the most about this.

The default included benchmark_params.yaml does work, if you want to use mvtec examples.

Here is also config you have for hazelnut_toy that I fixed and verified that is working:

seed: 42
compute_openvino: false
hardware:
  - gpu
writer:
  - wandb
grid_search:
  dataset:
    name: hazelnut
    format: folder
    root: datasets/hazelnut_toy
    normal_dir: good # name of the folder containing normal images.
    abnormal_dir: colour # name of the folder containing abnormal images.
    normal_test_dir: null
    task: segmentation # classification or segmentation
    mask_dir: mask/colour
    extensions: .jpg
    split_ratio: 0.2
    category:
      - colour
      - crack
    image_size: [128, 256]
  model_name:
    - padim
    - stfpm

@openvinotoolkit openvinotoolkit locked and limited conversation to collaborators Jul 21, 2023
@samet-akcay samet-akcay converted this issue into discussion #1207 Jul 21, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants