Git Product home page Git Product logo

Comments (4)

WeberJulian avatar WeberJulian commented on June 2, 2024

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

from trainer.

WeberJulian avatar WeberJulian commented on June 2, 2024

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 ?

from trainer.

erogol avatar erogol commented on June 2, 2024

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.

from trainer.

WeberJulian avatar WeberJulian commented on June 2, 2024

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

from trainer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.