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

assert len(cv_df) > 0, "Fraction a bit too large?" #13

Open
wonyeongdeok opened this issue Jan 24, 2022 · 1 comment
Open

assert len(cv_df) > 0, "Fraction a bit too large?" #13

wonyeongdeok opened this issue Jan 24, 2022 · 1 comment

Comments

@wonyeongdeok
Copy link

Thansk for your code.
I`m trying to train from scratch by teacher1.
But I did meet this error when I run 'run.py'.
How can I solve this problem?
Advancely Thank you!!

(env_gpvad)my_account:~/Datadriven-GPVAD$ python run.py train configs/example.yaml
[2022-01-24 20:46:21] Storing files in experiments/CRNN/2022-01-24_20-46-01_400e8c547d0b11ec9397a0423f3aed9a
[2022-01-24 20:46:21] batch_size: 64
[2022-01-24 20:46:21] data: data/csv_labels/balanced.csv
[2022-01-24 20:46:21] data_args:
[2022-01-24 20:46:21] mode: null
[2022-01-24 20:46:21] early_stop: 15
[2022-01-24 20:46:21] epochs: 15
[2022-01-24 20:46:21] itercv: 10000
[2022-01-24 20:46:21] label: data/softlabels/csv/balanced.csv
[2022-01-24 20:46:21] label_type: soft
[2022-01-24 20:46:21] loss: FrameBCELoss
[2022-01-24 20:46:21] model: CRNN
[2022-01-24 20:46:21] model_args: {}
[2022-01-24 20:46:21] num_workers: 8
[2022-01-24 20:46:21] optimizer: AdamW
[2022-01-24 20:46:21] optimizer_args:
[2022-01-24 20:46:21] lr: 0.001
[2022-01-24 20:46:21] outputpath: experiments/
[2022-01-24 20:46:21] postprocessing: double
[2022-01-24 20:46:21] save: best
[2022-01-24 20:46:21] scheduler_args:
[2022-01-24 20:46:21] factor: 0.1
[2022-01-24 20:46:21] patience: 10
[2022-01-24 20:46:21] threshold: null
[2022-01-24 20:46:21] transforms:
[2022-01-24 20:46:21] - timemask
[2022-01-24 20:46:21] - freqmask
[2022-01-24 20:46:21]
[2022-01-24 20:46:21] Running on device cpu
[2022-01-24 20:46:21] train_df
[2022-01-24 20:46:21] cv_df
[2022-01-24 20:46:21] Transforms:
[2022-01-24 20:46:21] Sequential(
[2022-01-24 20:46:21] (0): TimeMask()
[2022-01-24 20:46:21] (1): FreqMask()
[2022-01-24 20:46:21] )
Traceback (most recent call last):
File "run.py", line 639, in
fire.Fire(Runner)
File "/home/t3qadmin/anaconda3/envs/env_gpvad/lib/python3.7/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/home/t3qadmin/anaconda3/envs/env_gpvad/lib/python3.7/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/home/t3qadmin/anaconda3/envs/env_gpvad/lib/python3.7/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "run.py", line 118, in train
assert len(cv_df) > 0, "Fraction a bit too large?"
AssertionError: Fraction a bit too large?

@RicherMans
Copy link
Owner

Hey there,
seems like your data has some problems. The code throws this exception if it cannot split training and cv data, which usually means that the training data is too small or just plainly wrongly formatted.
I suggest you to do a print(cv_df) on line 117, as well as print(train_df) ( just replace with the correct name).

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

2 participants