mcao516 / EntFA

25 stars 7 forks source link

Summaries generated by RL-model #2

Open anton164 opened 2 years ago

anton164 commented 2 years ago

Hi again! Would you be able to share the summaries that were generated by the best model reported in your paper? We are reproducing and comparing our own approaches with your results, so it would be great to have the summaries to verify that we're on track :)

Thanks, Anton

anton164 commented 2 years ago

Alternatively - if you can share the code for training the reinforcement learning model so we can reproduce by running it on our end, that would be great!

mcao516 commented 2 years ago

Sure. We will add the RL training code to the repo soon.

pkuzengqi commented 2 years ago

Hi @mcao516

Probelm 1: I notice that some dependecies are missing to run your rl_training pip install accelerate tensorboard datasets nltk

Probelm 2: the paths in the bash file are not specified

MODEL_NAME_OR_PATH=/huggingface/bart-large
OUTPUT_DIR=/BART_HF_models/TEST/

In the paper (page 11) you mentioned In the off-line RL experiment, we initialize the model using the BART large model finetuned on XSUM dataset (https://github.com/facebookresearch/fairseq/tree/main/examples/bart). But your train_rl code does not take models finetuned using fairseq format as input.

Is the /huggingface/bart-large downloaded from https://huggingface.co/facebook/bart-large-xsum?

Probelm 3: train.json are val.json are not provided. I uncommented --dataset_name xsum --source_prefix "summarize: " --dataset_config "3.0.0" --overwrite_cache true in train_rl.sh and run

pip install accelerate tensorboard datasets nltk
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
sudo yum install git-lfs
git lfs clone https://huggingface.co/facebook/bart-large-xsum
bash train_rl.sh

It will occur a TypeError: Provided function which is applied to all elements of table returns a dict of types [<class 'list'>, <class 'list'>, <class 'list'>, <class 'NoneType'>]. When using batched=True, make sure provided function returns a dict of types like (<class 'list'>, <class 'numpy.ndarray'>) in https://github.com/mcao516/EntFA/blob/590d0f434dbfe7556bec17932c2919ea86f3241e/rl_training/train.py#L449