GithubHelp home page GithubHelp logo

Comments (3)

vince62s avatar vince62s commented on May 25, 2024

look at this: https://github.com/OpenNMT/OpenNMT-py/blob/master/onmt/utils/scoring_utils.py
and the way it is instanced and called from Trainer.py
This is what we use to compute BLEU score at validation time.

from opennmt-py.

Garfounkel avatar Garfounkel commented on May 25, 2024

Got it, thanks. This gives me a good idea how I could hack my own custom evaluation mechanism directly into the ScoringPreparator. But just to be clear, you're suggesting that I do that because there's no callback system at the moment ?

Thinking out loud, it seems that ScoringPreparator is indeed the correct place for me to inject my logic, but it feels very hacky. I don't want to compute my metric on the valid set, I have my own test set that I use for this metric. I also need to communicate with a web service to push scores and predictions for further analysis.

Basically my point is: sure I could inject all of that into ScoringPreparator, but what makes more sense to me is a custom callback that I could add in the config file, similar to how custom transforms are implemented.

Does that make sense? Do you think there's need for such a feature?

from opennmt-py.

vince62s avatar vince62s commented on May 25, 2024

I am not sure to understand what exactly you are looking for. You mentioned earlier that you want to compute a metric based on a "saved checkpoint" meaning it has to happen when ever you save a checkpoint, but compute your metric on what data ?
if it is not based on a checkpoint but must happen during training then you can look at where we report the stats (ppl, accuracy, ..)
Again I am not clear about what you are asking.

from opennmt-py.

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.