Code Monkey home page Code Monkey logo

Comments (3)

hitvoice avatar hitvoice commented on July 20, 2024

It should be very easy to modify "interact.py" to change the CLI predicting to batch mode. Load you json and replace the evidence and questions to the ones you load from file. Change

BatchGen([model_in], batch_size=1, gpu=args.cuda, evaluation=True)

to

BatchGen([model_in_1, model_in_2, ...], batch_size=batch_size, gpu=args.cuda, evaluation=True)

to perform batch prediction.
I didn't include this in the project because it's quite straightforward to do this with "interact.py" provided. Adding this script will add complexity to this project (since this project is for simplicity and ease to read) and will not be directly useful in most cases because test data formats vary from json, csv, database, web queries, ... "interact.py" is provided as a template and it should be easy to adapt this script to any input format.
If you find it hard to do this please post your questions here and I'll be listening :)

from drqa.

LearningPytorch avatar LearningPytorch commented on July 20, 2024

Ok..I'll try your suggestion tomorrow and post it here. Seems pretty straightforward..thanks

from drqa.

SETIADEEPANSHU avatar SETIADEEPANSHU commented on July 20, 2024

@LearningPytorch please post here the code modifications you made. It will be really helpful for others. Thank you

from drqa.

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.