-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I have not managed to get the code from this repository to work. I am trying to run it using a GPU instance on Google Colab, setting everything up according to the given instructions:
! git clone https://github.com/oja/aosumm.git
! gdown 1JUxlWUvU60OfYuO1OP-2awtw-rOSSJnY
! pip install -r aosumm/requirements.txt
! wget https://downloads.cs.stanford.edu/nlp/software/stanford-corenlp-full-2017-06-09.zip
! unzip stanford-corenlp-full-2017-06-09.zip
%env CLASSPATH=stanford-corenlp-full-2017-06-09/stanford-corenlp-3.8.0.jar
I downloaded the repo, the model file, install all the requirements specified in the file as well as CoreNLP, adding it to the class path too.
Then, in order to mitigate the fact that all commands on Colab are run from the /content/ directory, I tried launching the inference script as a subprocess, specifying the "current working directory" appropriately:
import subprocess
s = subprocess.run(
["python", "summarize.py", "--model", "../../qfsumm_cnndm_contrastive_model_step_28000.pt", '--keywords', 'disturbance,islands,hurricane',
'--text', "The 2021 Atlantic hurricane season is heating up early as the National Hurricane Center (NHC) monitors two different areas of potential development, and it's still June. Next up: Tropical Storm Elsa. Social media is awash with memes of the next named storm, which shares the same name as Disney's fictional character from the movie 'Frozen.' It may crack a smile for some parents, or even the weather-savvy 5-year-old, but this is one to watch closely. While the nearest area of activity (currently identified as invest 95L) has major hurdles to overcome in the days ahead, the NHC designated the next wave as 'Potential Tropical Cyclone Five' Wednesday afternoon. This tropical disturbance is currently about 1,200 miles east of the Windward Islands. Although any potential interaction with the US mainland wouldn't occur until the early to middle part of next week, this disturbance is becoming better organized as the hours pass and currently poses a more immediate threat to the Windward and Leeward Islands."
], cwd='aosumm/src/',
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
Nevertheless, I am getting this uninformative error message:
Traceback (most recent call last):
File "summarize.py", line 130, in <module>
with open(result_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '../results/2R4GX4ZALAZ3IZDI3L9I/2R4GX4ZALAZ3IZDI3L9I.outputs'
Having inspected the code, I understood that one of the subprocesses is failing quietly but it's not clear why. I tried hacking around and calling these subprocesses manually but didn't get very far with that.
The reason, I am using Colab in the first place is because having tried it on my Macs (Apple Silicon + Intel) - I got PyTorch messages about missing CUDA support (which simply doesn't exist for Macs).
It'd be great to be able to run your model without GPU support for inference or even better through HuggingFace. I've looked around a lot and this is supposedly the state-of-the-art model for aspect-based summarisation so it'd be a great shame for it not to be usable :)