only test
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
When I don't train, just test based on a pretrained checkpoint, I use the following script:
srun --comment clap --cpu_bind=v --accel-bind=gn python -m laion_clap.training.main \
--save-frequency 5 \
--save-top-performance 3 \
--save-most-recent \
--dataset-type="webdataset" \
--precision="fp32" \
--batch-size=256 \
--lr=1e-5 \
--wd=0.0 \
--epochs=0 \
--workers=6 \
--use-bn-sync \
--amodel HTSAT-base \
--tmodel chineseclip \
--warmup 3200 \
--freeze-audio \
--datasetnames "clotho" "audiocaps" "sounddesc" \
--datasetinfos "train" "unbalanced_train" \
--logs "clap_test_logs" \
--seed 3407 \
--datasetpath "/home/wangweifei/repository/wair/webdataset_tar/chinese" \
--gather-with-grad \
--optimizer "adam" \
--data-filling "repeatpad" \
--data-truncating "rand_trunc" \
--pretrained '/home/tangshuai/repository/audio_generation/CLAP/experiment_scripts/clap_logs/2023_07_12-19_51_52-model_HTSAT-base-lr_1e-05-b_256-j_6-p_fp32/checkpoints/epoch_90.pt'
Run this script, the error message displayed in the log is
Traceback (most recent call last):
File "/home/tangshuai/anaconda3/envs/audioldm/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/tangshuai/anaconda3/envs/audioldm/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/tangshuai/repository/audio_generation/CLAP/src/laion_clap/training/main.py", line 609, in <module>
main()
File "/home/tangshuai/repository/audio_generation/CLAP/src/laion_clap/training/main.py", line 333, in main
total_steps = data["train"].dataloader.num_batches * args.epochs
KeyError: 'train'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect src/laion_clap/training/main.py around line 333 and how the supplied command handles --epochs=0 with --pretrained. Run the test-only command from the issue; done means evaluation can run without a train dataloader and without the reported KeyError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100