Giter Site home page Giter Site logo

octanove / expats Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 4.0 164 KB

EXPATS: A Toolkit for Explainable Automated Text Scoring

License: Apache License 2.0

Makefile 2.41% Python 94.17% Shell 3.42%
nlp python natural-language-processing language-education deep-learning text-scoring

expats's Introduction

EXPATS: A Toolkit for Explainable Automated Text Scoring

EXPATS: A Toolkit for Explainable Automated Text Scoring

EXPATS is an open-source framework for automated text scoring (ATS) tasks, such as automated essay scoring and readability assessment. Users can develop and experiment with different ATS models quickly by using the toolkit's easy-to-use components, the configuration system, and the command-line interface. The toolkit also provides seamless integration with the Language Interpretability Tool (LIT) so that one can interpret and visualize models and their predictions.

Requirements

Usage

  1. Clone this repository.
$ git clone [email protected]:octanove/expats.git
$ cd expats
  1. Install Python dependencies via poetry, and launch an interactive shell
$ poetry install
$ poetry shell
  1. Prepare the dataset for your task

We'll use ASAP-AES, a standard dataset for autoamted essay scoring. You can download the dataset from the Kaggle page. EXPATS supports a dataset reader for ASAP-AES by default.

  1. Write a config file

In the config file, you specify the type of the task (task), the type of the profiler (profiler) and its hyperparmeters, and the dataset to use (dataset). An example config file for training a BERT-based regressor for ASAP-AES is shown below.

$ cat config/asap_aes/train_bert.yaml
task: regression

profiler:
    type: TransformerRegressor
    params:
      trainer:
        gpus: 1
        max_epochs: 80
        accumulate_grad_batches: 2
      network:
        output_normalized: true
        pretrained_model_name_or_path: bert-base-uncased
        lr: 4e-5
      data_loader:
        batch_size: 8
      val_ratio: 0.2
      max_length: null

dataset:
    type: asap-aes
    params:
        path: data/asap-aes/training_set_rel3.tsv
  1. Train your model

You can train the model by running the expats train command as shown below.

$ poetry run expats train config/asap_aes/train_bert.yaml artifacts

The result (e.g., log file, the model weights) is stored in the directory artifacts.

  1. Evalute your model

You can evaluate your model by running:

$ poetry run expats evaluate config/asap_aes/evaluate.yaml

You can also configure the evaluation settings by modifying the configuration file.

  1. Interpret your model

You can launch the LIT server to interpret and visualize the trained model and its behavior:

$ poetry run expats interpret config/asap_aes/interpret.yaml

expats's People

Contributors

mana-ysh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.