Giter Club home page Giter Club logo

Comments (5)

williamFalcon avatar williamFalcon commented on May 6, 2024

@LouisTrezzini it sounds like your experimentation framework is just the trainer... if we made this change we'd end back up with scattered non-standard code.

I'm not sure how portability would be affected? even if you did want to use your own trainer and feed your own data, then you'd probably just want to define a standard PyTorch module... CoolModel is just a nn.Module... nothing fancy about it.

But maybe I'm not understanding your use case.

from lightning.

williamFalcon avatar williamFalcon commented on May 6, 2024

Probably one of the first things that happens in trainer is to get the dataset. so, your proposal is equivalent...

Current:

Class Trainer(...):
     def fit():
          load_datasets # one of the first things

Proposed:

trainer(load_datasets())    

Which is the same thing...

from lightning.

LouisTrezzini avatar LouisTrezzini commented on May 6, 2024

Hello @williamFalcon, thanks for your prompt answer

even if you did want to use your own trainer and feed your own data, then you'd probably just want to define a standard PyTorch module...

To reformulate, my use case would be to use your trainer and CoolModel's step methods, BUT with our own data / on multiple datasets.

How would you suggest we do this?
Thanks!

from lightning.

williamFalcon avatar williamFalcon commented on May 6, 2024

@LouisTrezzini sure. just return your own dataloader instead of MNIST. If you need multiple aggregated datasets construct a joint dataloader (https://pytorch.org/docs/stable/data.html#torch.utils.data.ConcatDataset).

Define your own data in:

@pl.data_loader
def tng_dataloader(self):
    # return your own dataloader or dataConcat

Same for val and test data. See the LightningModule template

from lightning.

williamFalcon avatar williamFalcon commented on May 6, 2024

@LouisTrezzini did this answer your questions? if so, we can close this issue

from lightning.

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.