GithubHelp home page GithubHelp logo

dta_task2_baseline's Introduction

DTA_task2_baseline

Baseline method for DTA Dialogue Summarization task.

Setup

Install dependencies

Please install all the dependency packages using the following command:

pip install -r requirements.txt

Quick Start

  1. Download dataset (passord: 7mvn) and unzip it under the data folder.
  2. Download the pretrained model mbart-large-50.
  3. Execute command python3 preprocess.py to generate data for model training. This will generate train.jsonl and dev.jsonl in the data folder. Note that it will take few minutes.
  4. You can execute bash train.sh or the following command to train an baseline model.
    python3 -u pipeline.py \
        --do_train \
        --do_eval \
        --src_lang zh_CN \
        --tgt_lang zh_CN \
        --train_filename data/train.jsonl \
        --val_filename data/dev.jsonl \
        --max_src_len ${max_src_len} \
        --max_tgt_len ${max_tgt_len} \
        --remark ${remark} \
        --pretrained_model_path ${save_dir} \
        --vocab_path ${vocab_dir} \
        --save_dir ${save_dir} \
        --batch_size ${batch_size} \
        --num_train_epochs ${iter} \
        --skip_eval_epochs ${skip_iter} \
        --learning_rate ${learning_rate}
  5. You can execute bash test.sh or the following command to generate dialogue summary by the model trained before. And you will get your generated results in the test.pred file.
    python3 -u pipeline.py \
        --do_test \
        --src_lang zh_CN \
        --tgt_lang zh_CN \
        --test_filename data/dev.jsonl \
        --max_src_len ${max_src_len} \
        --max_tgt_len ${max_tgt_len} \
        --remark ${remark} \
        --pretrained_model_path ${model_dir} \
        --vocab_path ${vocab_dir} \
        --save_dir ${save_dir} \
        --batch_size ${batch_size} \
        --num_train_epochs ${iter} \
        --skip_eval_epochs ${skip_iter} \
        --learning_rate ${learning_rate}

Bug or Questions?

If you have any questions about the code, please open an issue or contact us by [email protected].

Please try to specify the problem with details so we can help you better and quicker!

dta_task2_baseline's People

Contributors

limkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dta_task2_baseline's Issues

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.