samxuxiang / SkexGen

[ICML 2022] Official PyTorch Implementation of "SkexGen: Autoregressive Generation of CAD Construction Sequences with Disentangled Codebooks".
https://samxuxiang.github.io/skexgen
MIT License
87 stars 17 forks source link

ImportError: cannot import name 'SketchData' from 'dataset' #4

Closed Kane-LAU closed 1 year ago

Kane-LAU commented 1 year ago

First of all, thank you very much for your contribution to intelligent CAD generation. It's great work. However, I encountered some issues while attempting to run the repository.

python train_sketch.py --train_data data/cad_data/train_deduplicate_s.pkl --output proj_log/exp_sketch --invalid data/cad_data/train_invalid.pkl  --val_data data/cad_data/val.pkl --bit 6 --maxlen 200 --batchsize 128 --device 0

bug:

SkexGen\train_sketch.py", line 4, in <module>
    from dataset import SketchData
ImportError: cannot import name 'SketchData' from 'dat

Can you provide me with some advice? I greatly appreciate it.

samxuxiang commented 1 year ago

I tested the code again and did not encounter this error. Can you try running with the provided docker image and also download the processed data. Let me know if you run into the same problem again. I tried it on a clean env and things should work fine. image

Kane-LAU commented 1 year ago

Thanks for your reply. but i cannot find "SktechData" function at /utils/dataset.py,

ImportError: cannot import name 'SketchData' from 'dataset' (D:\xin_code\SkexGen\utils\dataset.py)

https://github.com/samxuxiang/SkexGen/blob/main/utils/dataset.py

image

maybe you can check the code again 😊

samxuxiang commented 1 year ago

Hi, you can find SketchData class in the parent folder under dataset.py image