Comments (5)
Hi there @lireagan
thanks for opening the issue and sorry for the delay, I am a bit buys these days but I aim to come back to the package soon
Regarding your request, at the moment you can't. DataLoader are built internally here:
within the main "collector" class WideDeep
. The idea is that the user inputs arrays the rest in handled internally. I guess I could add the option of passing directly a loader to the .fit
method, but that would require changing some code.
Alternatively, you could tell me what you want to do and maybe you can already do it with the package (?)
from pytorch-widedeep.
Thank you for your response! There are 2 reasons why i want to use customized dataloader:
- If I only use csv files as input, it will load the whole dataset on cpu memory, and when the dataset is very large(for example, 2M samples), it will result in OOM. So I want to use some dataloaders which support batch-input.
- in some cases, my datasets are not save locally, they maybe on cloud, so I need the customized dataloaders provided by the cloud company.
from pytorch-widedeep.
Hi @lireagan
ok, yeah, possibly the easiest option would be refactoring the code to allow custom dataloaders, I will think how to do that smoothly.
In the meantime:
-
You could code you own batch generator, generate batches out of
np
arrays and pass them to the model. Bear in mind that one of the reason why I designed the dataloader as I did is because all components (wide, deep, text, image) have to be loaded in the same order (and you cannot do "random" data augmentation) -
let's say that your data is on S3. You can still download it locally and then pass it to the model? I mean, eventually is going to happen anyway, at some point during the process the data will be in your RAM, so you could design a process by which: S3 -> RAM (array) -> model (? )
Maybe I don't see all the process (or the whole pic), but let me know if this helps. I will try to add examples for those two solutions and let you know when I am done. I am bit busy these days, but I will do my best!
from pytorch-widedeep.
Yes, I'm refactoring the fit function and use my batch generator as an alternative.
The question 2 is that, the cloud provide a on-line read function:
reader = common_io.table.TableReader(table_name, selected_cols)
data = reader.read(num_records)
And I want to use this API to construct my own Dataset and generate batch-size inputs.
from pytorch-widedeep.
Ok, I see...
I will then look to add that functionality in the future.
Going to close this issue. I will re-open it if needed
Thanks for the issue @lireagan
from pytorch-widedeep.
Related Issues (20)
- Not Being able to reproduce Bert results HOT 5
- pytorch vision module error HOT 1
- save_best_only error and NaN during training HOT 9
- CyclicLR throws ZeroDivisionError when finetuning with a single batch. HOT 2
- EarlyStopping does not store and restore the model HOT 5
- Can I use time series data HOT 6
- CUDA error: device-side assert triggered HOT 5
- Wrong paper links on ContrastiveDenoisingTrainer HOT 2
- how to save the best Epoch HOT 11
- Dropout layer being created on forward pass (in MultiHeadedAttention) HOT 1
- about Wide's input dim HOT 5
- ImportError: cannot import name 'LRScheduler' from 'torch.optim.lr_scheduler' HOT 8
- OSError when importing the package HOT 4
- AttributeError: 'TabMlp' object has no attribute 'with_fds' HOT 3
- Colab session crash on .fit HOT 3
- IndexError: index out of range in self HOT 4
- how to use lr warmup in traing stage? HOT 3
- Problems running transformer models HOT 5
- 'TextPreprocessor' object has no attribute 'embedding_matrix' HOT 6
- How to install the previous version, the current 1.5 version has been working problems? HOT 14
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 pytorch-widedeep.