Comments (8)
Hey @tripl3a, this is a great idea and we think it should be a functionality inside of farm. Especially for small datasets you want some more stable evaluation criteria. It wont be super straightforward to implement though : )
A fast way would be to do it outside of FARM:
Pytorch doesn't have native CV code yet: pytorch/text#486
There is a Pytorch wrapper that does: https://github.com/skorch-dev/skorch It seems to be able to pass a Pytorch module (our adaptivemodel is one) to a Classifier and also Pytorch Datasets. If you want to try this, you could create a separate function in experiment.py, something like run_experiment_crossvalidated(n_folds=5, args). We have no experience with this package unfortunately.
If you want to integrate CV inside FARM, we should have a call and discuss how we proceed in more detail since it will create a lot of changes deep inside processor, data silo and trainer classes.
Do you have any preference or any thoughts about this?
from farm.
OK I have an example xval for doc classification, but it depends on the changes made in pull request 165, so I will wait for that one to get merged or further worked on.
from farm.
Thanks again @Timoeller for the feedback and for taking the time to have a call with me yesterday! As discussed, I don't have the capacity to implement such deep changes in FARM at the moment. Instead, I'll take a look at skorch
and keep you posted.
from farm.
Thanks again @Timoeller for the feedback and for taking the time to have a call with me yesterday! As discussed, I don't have the capacity to implement such deep changes in FARM at the moment. Instead, I'll take a look at
skorch
and keep you posted.
@tripl3a have you been successful to use skorch and would you be able to share code / insights?
from farm.
@johann-petrak No, I haven't tried it yet.
from farm.
From a quick look I had it does not look trivial to adapt/wrap the FARM dataset, model, optimizer etc so that it can be used like skorch needs it.
from farm.
I will try to come up with some example code for this but without using skorch, just using some of the sklearn functions.
from farm.
Merged in #167. Thanks @johann-petrak!
from farm.
Related Issues (20)
- MTL Processor QA + Classification HOT 1
- Querying API Docker examples HOT 1
- Should be possible to use the proper aggregated loss for early stopping HOT 3
- AdaptiveModel.convert_to_onnx does not save float16 model conversion to output_path HOT 1
- ONNXAdaptiveModel causes NameError: name 'onnxruntime' is not defined HOT 1
- Error reporting using other pre training models HOT 2
- how to predict on single data points for classification problem.? HOT 2
- Error Importing Inferencer HOT 4
- Retreiver Fine Tuning : Are language models like roberta, gpt2 supported to use in retreiver? HOT 3
- Can't train a language model HOT 4
- Max token size? HOT 2
- summarization HOT 1
- Combine several models into one with several prediction heads HOT 2
- Need a guidance on Multi label Classification HOT 2
- Extract embedding while using parameter "extraction_strategy="per_token"" HOT 1
- Which pytorch (and other package) versions are actually required HOT 4
- Current version `0.8.1-snapshot` is not valid according to PEP 440 and causes installation problems HOT 1
- Columns and DataType Not Explicitly Set on line 147 of wordembedding_utils.py
- Installation error
- IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed
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 farm.