In this repo we will document the reproducibility issues of the paper Aligning Actions Across Recipe Graphs.
To reproduce the paper's claimed results, please start with creating the exactly same environment the paper used:
conda create -n ada python==3.7
conda activate ada
pip install -r requirements.txt
For compability issues, please check the next section.
They provide package versions that are not compatible with eachother. Pandas 1.2.3 is not compatible with Python 3.7
Just download Pandas 1.1
CUDA would complain since the original paper is using a super old version of torch==1.7.1
and the new generation of GPUs can not be compiled with old version torch, this will cause torch.device("cuda")
unusable.
To solve this error, please run the following commands:
pip uninstall torch
pip3 install torch==1.7.1 --force-reinstall --extra-index-url https://download.pytorch.org/whl/cu110
To get started run the following commands to get the data:
git clone https://github.com/MikeySaw/ara_seminar_research
git clone https://github.com/interactive-cookbook/alignment-models
mv alignment-models/data/ ara_seminar_research/
To train the model, run the following command from root directory:
python train.py [model_name] --embedding_name [embedding_name] --fold [fold]
where [model_name]
could be one of the following:
Sequence
: Sequential Ordering of AlignmentsCosine_similarity
: Cosine model (Baseline)Naive
: Common Action Pair Heuristics mode (Naive Model)Alignment-no-feature
: Base Alignment model (w/o parent+child nodes)Alignment-with-feature
: Extended Alignment model (with parent+child nodes)
and [embedding_name]
could be one of the following:
bert
: BERT embeddings (default)elmo
: ELMO embeddings
additionally [fold]
is a number between 1 and 10:
Here you specify on which fold to run the validation on
Right now the Naive
and Cosine-similarity
models don't work.
To test the model, choose the application from the following:
Run the following command from this directory:
python test_best_alignment.py [model_name] --embedding_name [embedding_name]
As output, a prediction file named after the test dish(es) will be created. Here the best alignment computed for each action of the test recipes is saved.
The testing script is not working according to what is described in the paper and the original repo.