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

job is failed: Error: NameError: name 'kmeans' is not defined #2

Open
HermannLizard opened this issue Dec 15, 2020 · 3 comments
Open

Comments

@HermannLizard
Copy link

HermannLizard commented Dec 15, 2020

运行pipcook主页的例子《识别图片中的前端组件》时报错:
job is failed: Error: NameError: name 'kmeans' is not defined
At:
./node_modules/@pipcook/plugins-pytorch-yolov5-model-train/tools/general.py(100): kmean_anchors
./node_modules/@pipcook/plugins-pytorch-yolov5-model-train/tools/general.py(623): check_anchors
./node_modules/@pipcook/plugins-pytorch-yolov5-model-train/init.py(141): train
./node_modules/@pipcook/plugins-pytorch-yolov5-model-train/init.py(289): main

at Function.value (/Users/hermannlizard/.pipcook/server/node_modules/@pipcook/boa/lib/index.js:204:25)
at Object.apply (/Users/hermannlizard/.pipcook/server/node_modules/@pipcook/boa/lib/index.js:401:26)
at /Users/hermannlizard/.pipcook/server/node_modules/@pipcook/costa/dist/src/client/loaders/python.js:8:24
at /Users/hermannlizard/.pipcook/server/node_modules/@pipcook/costa/dist/src/client/entry.js:142:32
at Generator.next (<anonymous>)
at /Users/hermannlizard/.pipcook/server/node_modules/@pipcook/costa/dist/src/client/entry.js:27:71
at new Promise (<anonymous>)
at __awaiter (/Users/hermannlizard/.pipcook/server/node_modules/@pipcook/costa/dist/src/client/entry.js:23:12)
at emitStart (/Users/hermannlizard/.pipcook/server/node_modules/@pipcook/costa/dist/src/client/entry.js:85:12)
at /Users/hermannlizard/.pipcook/server/node_modules/@pipcook/costa/dist/src/client/entry.js:202:13

后面还有:
job is failed: Error: NameError: name 'tqdm' is not defined
job is failed: TypeError: ModuleNotFoundError: No module named 'PIL'

@yorkie
Copy link
Member

yorkie commented Dec 16, 2020

@HermannLizard @rickycao-qy could this be closed?

@HermannLizard
Copy link
Author

HermannLizard commented Dec 17, 2020

@HermannLizard @rickycao-qy could this be closed?

OK. Everything is running for me now. Thx!
However, model train process is verrrrrrrry slow...
`
Starting training for 300 epochs...
⚠ run pipeline from pipeline dm6w7alu
⚠ Epoch gpu_mem box obj cls total targets img_size
⚠ Epoch: 0

⚠ 0/299 0G 0.07528 0.0932 0.01748 0.186 192 640
⚠ Current Best Map: [0.04981411]
⚠ Epoch: 1
`
Epoch: 0 took about 2h on my pc, and I have another 299 epochs coming…

My mac info:
MacBook Pro (16-inch, 2019)
2.6 GHz 六核Intel Core i7
16 GB 2667 MHz DDR4
AMD Radeon Pro 5300M 4 GB
Intel UHD Graphics 630 1536 MB

Is that normal for this PC taking this long to run trainings? Or did I have something wrong in my configuration, any suggestions? Thanks a lot

@FeelyChau
Copy link

@HermannLizard Generally speaking, using NVIDIA's GPU can speed up the training, but each epoch takes 2 hours, which is abnormal.

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

No branches or pull requests

3 participants