The code contains the pipeline for Unsupervised Self Training.
Run the main.py file to run the pipeline. The pipeline very closely resembles the pipeline described in the paper. The code is split into the following steps:
- Run initialize.sh to set up the directory to run the pipeline
A. INITIALIZATION STEP
- Make zero shot predictions
- Select top N sentences using selection criteria and split data
B. ITERATIVELY FINE TUNE MODEL
- Fine tune model based on selected sentences (FINE TUNE BLOCK)
- Make predictions from fine tuned model (PREDICTION BLOCK)
- Select and Split data (SELECTION BLOCK)
NOTE ON DATA FILE: The input data file for the code is a .pkl file, where the pkl file contains a list. Each element of the list is a training sample, where data is stored in the form of a tuple The schema of the tuple should be : (sample_id, sample, label)