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

[Bug] No warning or error when no eval samples provided #23

Open
erogol opened this issue Apr 1, 2022 · 4 comments
Open

[Bug] No warning or error when no eval samples provided #23

erogol opened this issue Apr 1, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@erogol
Copy link
Member

erogol commented Apr 1, 2022

Describe the bug

👟 needs to raise an error when there is no eval sample or skip the eval step.

👉 coqui-ai/TTS#1447

To Reproduce

coqui-ai/TTS#1447

Expected behavior

Raise an error " [!] No eval samples provided"

Or skip the eval step

Logs

No response

Environment

https://github.com/coqui-ai/TTS/issues/1447

Additional context

No response

@erogol erogol added the bug Something isn't working label Apr 1, 2022
@WeberJulian WeberJulian self-assigned this Apr 1, 2022
@WeberJulian
Copy link
Contributor

It should probably crash and if people want to train without eval samples, they can skip it with run_eval = False

@WeberJulian
Copy link
Contributor

Not sure where to raise the error though.

If we put it in the __init__ here, we risk raising an error when the samples were actually being loaded in model.get_data_loader().

But if we check after the get_eval_dataloader here, when no eval sample are provided it can crash if the model.get_data_loader doesn't support no samples being passed to it.
For example gan dataset here throws this without eval samples.

Traceback (most recent call last):
  File "/home/julian/workspace/Trainer/trainer/trainer.py", line 1467, in fit
    self._fit()
  File "/home/julian/workspace/Trainer/trainer/trainer.py", line 1453, in _fit
    self.eval_epoch()
  File "/home/julian/workspace/Trainer/trainer/trainer.py", line 1314, in eval_epoch
    self.get_eval_dataloader(
  File "/home/julian/workspace/Trainer/trainer/trainer.py", line 777, in get_eval_dataloader
    return self._get_loader(
  File "/home/julian/workspace/Trainer/trainer/trainer.py", line 700, in _get_loader
    loader = model.get_data_loader(
  File "/home/julian/workspace/TTS/TTS/vocoder/models/gan.py", line 333, in get_data_loader
    dataset = GANDataset(
  File "/home/julian/workspace/TTS/TTS/vocoder/datasets/gan_dataset.py", line 36, in __init__
    self.compute_feat = not isinstance(items[0], (tuple, list))
TypeError: 'NoneType' object is not subscriptable

Where should we do this in your mind @erogol ?

@erogol
Copy link
Member Author

erogol commented Apr 3, 2022

maybe we can use an empty list as the default for the samples and check the data loader size. If it is zero, raise an error.

@WeberJulian
Copy link
Contributor

We'd still have the same problem, since item[0] would raise out if range right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants