Comments (5)
@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.
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.
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.
@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.
@LouisTrezzini did this answer your questions? if so, we can close this issue
from lightning.
Related Issues (20)
- IndexError: Pytorch-lightning CompositionalMetric require tensor.item() if dim=0 whether I did so
- Huge metrics jump between epochs && Step and epoch log not matched, when accumulate_grad_batches > 1
- Does `fabric.save()` save on rank 0? HOT 3
- Turn off hpc checkpoint saving in SLURM environment if trainer.fit(..., ckpt_path="last") HOT 3
- DDP strategy doesn't work for on_validation_epoch_end, always hang HOT 4
- TensorBoardLogger does not document .add_image() function
- Passing a dataloader to save_hyperparams hangs trainer.fit
- If saved_for_backward returns NumberProxy, the value is taken from compile time, not runtime. HOT 1
- logged images are not showing up in tensorboard images.
- Enable batch size finder for distributed strategies HOT 1
- Support wandb_logger.watch() when using LightningCLI
- The packages such as libraries and models are not loading from files
- Please make it simple!
- LOG issue HOT 1
- Multi-gpu training is much lower than single gpu (due to additional processes?)
- Missing documentation for the `log_weight_decay` argument in `lightning.pytorch.callbacks.LearningRateMonitor`
- parsing issue with `save_last` parameter of `ModelCheckpoint`
- Construct objects from yaml by classmethod
- FSDP Strategy checkpoint loading
- Current FSDPPrecision does not support custom scaler for 16-mixed precision
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightning.