UCDP-AEC

Models and data for the UCDP Abstractive Event analysis Corpus paper
git clone https://esimon.eu/repos/UCDP-AEC.git
Log | Files | Refs | README | LICENSE

README.md (1686B)


      1 ## Environment
      2 - Python==3.11
      3 - datasets==3.2.0
      4 - torch==2.6.0
      5 - transformers==4.48.3
      6 - accelerate==1.3.0
      7 - tensorboard==2.18.0
      8 
      9 ## Datasets
     10 
     11 This setup is designed for UCDP-AEC, with input and output templates defined in `spec/aec_setup.py`. Templates can be modified to adapt to different event argument structures.
     12 
     13 ## Training
     14 
     15 Training parameters can be specified either in `aec_setup.py` or provided as command-line arguments (--parameters). The following configuration options are available:
     16 - `eval`: Whether to only run evaluation.
     17 - `transformer`: Defines the HF model to run. Must be any of T5 family.
     18 - `num_train_epochs`: Number of training epochs.
     19 - `learning_rate`: The initial learning rate.
     20 - `model.generation_max_length`: Maximum number of tokens to generate during evaluation.
     21 - `dataset.name`: Name of the dataset to train on. It must be a directory in `$DATA_PATH`.
     22 - `dataset.input_template`: Template to use for the generative representation of input.
     23 - `dataset.output_template`: Template to use for the generative representation of output.
     24 
     25 Before starting, ensure the following environment variables are set:
     26 - `DATA_PATH`: Root directory for dataset arrow files.
     27 - `MODEL_PATH`: Directory for model checkpoints.
     28 - `LOG_PATH`: Directory for evaluation results.
     29 
     30 Execute training with:
     31 ```sh
     32 python -m t5 t5/spec/aec_setup.py [--parameters]
     33 ```
     34 
     35 ## Evaluation
     36 
     37 If everything went correctly, evaluation results will be saved in `LOG_PATH` under a directory named after the run's parameters and timestamp, containing the files `validation_output.jsonl` and `test_output.jsonl`, which can be used with `process_output.py` to format results for `aec/evaluate.py`.