Comments (7)
I guess this one was fixed and may be closed. @generall
from quaterion.
As another possibility, we can return dataloader to the state when it is usable (after setup_dataloader
and before fit
)
But the idea to skip unwrapping seems more functional, as we do not need to calculate embeddings again then
from quaterion.
Good point. We can name the keyword arg something like keep_cache
and this would be self-explanatory.
I'm not sure but we may also consider removing it from Quaterion.fit
completely from because we already call it in save_servable
.
But again, optional skipping seems to be generalizable to more use cases
from quaterion.
But the idea to skip unwrapping seems more functional, as we do not need to calculate embeddings again then
the problem is that if user have 3rd left-off dataset, which was not used during the fit
- it will be incompatible with cached data loader. From my point of view I would prefer to keep cache wrappings internally and unwrap dataloaders before as well as model before the return
from quaterion.
if user have 3rd left-off dataset,
then they can prefer to unwrap it --it'll be optional anyway.
keep cache wrappings internally and unwrap dataloaders
I'm not sure that I got this correctly.
from quaterion.
My proposal is as follows:
Quaterion.fit(..., keep_cache: bool = True)
.- Then in that method:
if not keep_cache:
trainable_model.unwrap_cache(train_dataloader, val_dataloader) # it should unwrap data loaders and model synchronously
- Rename
TrainableModel.cache
toTrainableModel.cache_dataloader
, and except a single data loader instead of two, so that user can cache their 3rd (or n-th) data loader when they need to. - Call
TrainableModel.setup_dataloader
insideTrainableModel.cache_dataloader
- Document the whole cycle of training / testing and how caching is functioning.
from quaterion.
Another possible side effect - double wrapping of encoders during the recovery from checkpoint. Possible solution: check if encoder is already a subclass of cache
from quaterion.
Related Issues (20)
- [tutorial] triplet-loss collapse prevention
- Badges in readme
- [BUG] ImportError: cannot import name 'PossibleUserWarning' from 'pytorch_lightning.utilities.warnings' HOT 2
- [bug] broken links in documentation
- [docs] Add README.md to `examples` HOT 2
- Implement cross-batch memory for losses HOT 2
- PyTorch Lightning's Stochastic Weight Averging callback causes infinite recursion HOT 4
- Add Quaterion to conda channel
- what is the use of freezing the encoder ? HOT 2
- Add support for soft margin variant of triplet loss
- Inplace computation error with XBM HOT 10
- Reduce amount of memory required by mining strategies HOT 2
- Implement multi-objective loss HOT 2
- Improve evaluation procedure for extensive results HOT 1
- Training error using multiple GPUs
- How to load encoder HOT 3
- error while serving the model HOT 5
- No Python 3.9/3.10 support of quaternion and quaternion-models HOT 2
- Feature: FastAP Loss Function HOT 2
- Improvement: Update internal `torch.norm` calls to `torch.linalg.norm` HOT 2
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 quaterion.