recap-utr / argument-graph-mining

Implementation of the Paper "Towards an Automated Argument Mining Pipeline to Transform Plain Text to Argument Graphs"
http://recap.uni-trier.de
Apache License 2.0
22 stars 5 forks source link

I can't run the program #2

Open AntonioDLC opened 3 months ago

AntonioDLC commented 3 months ago

I get error from both docker and poetry. From docker I get:

sudo docker-compose run app python -m recap_am.server [sudo] password for tuan: Building app Step 1/8 : FROM python:3.7-slim ---> a255ffcb469f Step 2/8 : ENV POETRY_VERSION=1.0.0 ---> Using cache ---> e03c6ec65256 Step 3/8 : WORKDIR /app ---> Using cache ---> ce8804c5688e Step 4/8 : RUN apt update && apt install -y --no-install-recommends graphviz && rm -rf /var/lib/apt/lists/ ---> Using cache ---> 3286e75c31bf Step 5/8 : RUN pip install "poetry==${POETRY_VERSION}" && poetry config virtualenvs.create false ---> Using cache ---> 655095f1f764 Step 6/8 : COPY poetry.lock pyproject.toml ./ ---> Using cache ---> ff9289d788ff Step 7/8 : RUN poetry install --no-interaction --no-ansi ---> Running in a0b4ef26aa59 Skipping virtualenv creation, as specified in config file. Installing dependencies from lock file

Package operations: 66 installs, 8 updates, 0 removals

  • Updating six (1.16.0 -> 1.14.0)
  • Installing docutils (0.15.2)
  • Installing jmespath (0.9.5)
  • Installing python-dateutil (2.8.1)
  • Updating urllib3 (2.0.7 -> 1.25.9)
  • Installing botocore (1.15.48)
  • Updating zipp (3.15.0 -> 3.1.0)
  • Updating certifi (2024.7.4 -> 2020.4.5.1)
  • Installing chardet (3.0.4)
  • Installing click (7.1.2)
  • Installing cymem (2.0.3)
  • Updating idna (3.7 -> 2.9)
  • Updating importlib-metadata (0.23 -> 1.6.0)
  • Installing joblib (0.14.1) ... (skipping a few lines)
  • Installing werkzeug (1.0.1)
  • Installing black (18.9b0)
  • Installing edlib (1.3.8.post1)

[EnvCommandError] Command ['/usr/local/bin/python', '-m', 'pip', 'install', '--no-deps', 'edlib==1.3.8.post1'] errored with the following return code 1, and output: Collecting edlib==1.3.8.post1 Downloading edlib-1.3.8.post1.tar.gz (93 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.6/93.6 kB 1.3 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Building wheels for collected packages: edlib Building wheel for edlib (setup.py): started Building wheel for edlib (setup.py): finished with status 'error' error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [11 lines of output] running bdist_wheel running build running build_ext building 'edlib' extension creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/edlib creating build/temp.linux-x86_64-3.7/edlib/src gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iedlib/include -I/usr/local/include/python3.7m -c edlib.bycython.cpp -o build/temp.linux-x86_64-3.7/edlib.bycython.o -O3 -std=c++11 unable to execute 'gcc': No such file or directory error: command 'gcc' failed with exit status 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for edlib Running setup.py clean for edlib Failed to build edlib Installing collected packages: edlib Running setup.py install for edlib: started Running setup.py install for edlib: finished with status 'error' error: subprocess-exited-with-error

× Running setup.py install for edlib did not run successfully. │ exit code: 1 ╰─> [11 lines of output] running install running build running build_ext building 'edlib' extension creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/edlib creating build/temp.linux-x86_64-3.7/edlib/src gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iedlib/include -I/usr/local/include/python3.7m -c edlib.bycython.cpp -o build/temp.linux-x86_64-3.7/edlib.bycython.o -O3 -std=c++11 unable to execute 'gcc': No such file or directory error: command 'gcc' failed with exit status 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> edlib

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

[notice] A new release of pip is available: 23.0.1 -> 24.0 [notice] To update, run: pip install --upgrade pip

ERROR: Service 'app' failed to build : The command '/bin/sh -c poetry install --no-interaction --no-ansi' returned a non-zero code: 1

And from poetry I get:

poetry run python -m recap_am.server Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/tuan/Documents/Repos/argument-graph-mining/recap_am/server.py", line 1, in from recap_am import app File "/home/tuan/Documents/Repos/argument-graph-mining/recap_am/app.py", line 15, in import recap_argument_graph as ag ModuleNotFoundError: No module named 'recap_argument_graph'

AntonioDLC commented 3 months ago

I have zero experience using docker or poetry. I get that docker is some sort of container program but I never really had the need to use it. If this error is not something you have the will or time to look into, could you send me a couple examples of input and output data you got from this? I'm particularly interested in generating a graph for this document: https://nap.nationalacademies.org/catalog/10490/dietary-reference-intakes-for-energy-carbohydrate-fiber-fat-fatty-acids-cholesterol-protein-and-amino-acids I manually made one but it took a lot of effort even for a single short claim: https://antoniodlc.github.io/alimenergia_plus_docuparts_horizontal.svg

mirkolenz commented 3 months ago

Sorry to hear that! I think the main problem will be that the package recap-argument-graph is no longer maintained and even seems to have been removed from PyPI. It has been superseded by arguebuf, but arguebuf needs newer Python versions than this software supports. I am currently quite busy with other projects, but would love to see this application working again. I will add it to my TODO list and investigate the issue once I have some spare time 😄

For the time being: I was able to get quite promising-looking argument graphs using ChatGPT. You could try to extract the plain text of the mentioned document and prompt the LLM to generate a graph structure out of it.

AntonioDLC commented 3 months ago

Thanks! I was actually looking into that too. The gpt graphs suck IMO plus they take a long while to generate. But maybe it's because of my prompts.

I guess it's only a matter of time before the data for training one of these LLM for this specific task is created and fed to it? I'm going to keep trying prompts and searching for papers or investigations ongoing around this matter then. Took me a while to realize the keywords for this whole thing were "argument mining" and "argument graph".

If you know any way I can join a group to contribute to investigations on how to automate the argument graphing of the current scientific corpus let me know!

mirkolenz commented 3 months ago

Yeah, LLM-generated graphs have some issues and it indeed quite slow. I will let you know about any progress I make, but it could take some time, sadly. I recently published a conference paper on using LLMs to do the relation prediction (support/attack) for argument graphs. I will send you a link to it once it is available (should be in August), it contains a comparison of some prompting strategies that may be of value for you!