Giter Club home page Giter Club logo

Comments (8)

Timoeller avatar Timoeller commented on May 23, 2024 1

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.

johann-petrak avatar johann-petrak commented on May 23, 2024 1

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.

tripl3a avatar tripl3a commented on May 23, 2024

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.

johann-petrak avatar johann-petrak commented on May 23, 2024

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.

tripl3a avatar tripl3a commented on May 23, 2024

@johann-petrak No, I haven't tried it yet.

from farm.

johann-petrak avatar johann-petrak commented on May 23, 2024

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.

johann-petrak avatar johann-petrak commented on May 23, 2024

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.

tholor avatar tholor commented on May 23, 2024

Merged in #167. Thanks @johann-petrak!

from farm.

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.