tracel-ai / burn

Burn is a new comprehensive dynamic Deep Learning Framework built using Rust with extreme flexibility, compute efficiency and portability as its primary goals.

Home Page:https://burn.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guide example doesn't train anything

fdietze opened this issue · comments

Describe the bug

Following the guide from the book, as well as cloning this repo and running the guide example there doesn't seem to train anything. Running it prints nothing and exits immediately.

To Reproduce

Run the commands from the readme:

https://github.com/tracel-ai/burn/tree/main/examples/guide#readme

Rust 1.79.0 in devbox on NixOS.

Expected behavior

I expected the training tui to show up.

Huh, that's weird. Probably an error happening during training setup.

Can you check the experiments logs under the artifact directory /tmp/guide? Since the default renderer is TUI, the stderr is redirected there.

experiment.log:

2024-07-22T15:14:58.798866Z  INFO burn_fusion::stream::store::base: New execution plan 0 - Operations: 1 - Triggers 1    
2024-07-22T15:14:58.817491Z ERROR burn_train::learner::application_logger: PANIC => panicked at crates/burn-wgpu/src/runtime.rs:329:17:
No adapter found for graphics API AutoGraphicsApi    

Ok, so it seems that it doesn't detect my graphics card. I'm on a laptop with embedded intel graphics, so I expected it to use that one or fall back to cpu. I'll try with explicit CPU backend when I have time.

There are multiple options when using wgpu: vulkan, metal, OpenGL, dx12 or webgpu (browser).

The AutoGraphicsApi will automatically select the option according to your OS, which will be vulkan most of the time. Probably your device isn't being detected (maybe you need to install vulkan?).

If you want to use the CPU, you could also use another backend like NdArray or LibTorch.

There are multiple options when using wgpu: vulkan, metal, OpenGL, dx12 or webgpu (browser).

The AutoGraphicsApi will automatically select the option according to your OS, which will be vulkan most of the time. Probably your device isn't being detected (maybe you need to install vulkan?).

If you want to use the CPU, you could also use another backend like NdArray or LibTorch.

Or Candle backend, which is the fastest available now.

Tried candle, which complained about some missing features. But I got NdArray to work.

Thank you! That got me started.