dmis-lab/BERN2

Troubles running locally, FileNotFoundError

dmytrobabych opened this issue · 7 comments

I'm trying to run locally and following the steps described in README, I get this

[21/Jan/2022 11:56:35.780036] id: 7bb79cf620bd0ba345504784f5aaa6ad48394bcd1cf10b7e29964e05
[21/Jan/2022 11:56:36.632464] [7bb79cf620bd0ba345504784f5aaa6ad48394bcd1cf10b7e29964e05] tmVar 2.0 0.8203573226928711 sec
[21/Jan/2022 11:56:38.605409] [7bb79cf620bd0ba345504784f5aaa6ad48394bcd1cf10b7e29964e05] GNormPlus 2.742703914642334 sec
Traceback (most recent call last):
  File "/Users/dima/code/BERN2/bern2/bern2.py", line 105, in annotate_text
    output = self.tag_entities(text, base_name)
  File "/Users/dima/code/BERN2/bern2/bern2.py", line 290, in tag_entities
    async_result = loop.run_until_complete(self.async_ner(arguments_for_coroutines))
  File "/Users/dima/opt/anaconda3/envs/bern2/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/Users/dima/code/BERN2/bern2/bern2.py", line 417, in async_ner
    result = await asyncio.gather(*coroutines)
  File "/Users/dima/code/BERN2/bern2/bern2.py", line 459, in _ner_wrap
    with open(output_mtner, 'r', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: './multi_ner/output/7bb79cf620bd0ba345504784f5aaa6ad48394bcd1cf10b7e29964e05.PubTator.json'

The only thing I've changed is removing transferring models to cuda, since I don't have GPU on my current machine.

Hi @dmytrobabych

Sorry for the inconvenience.
There seems to be a problem with the Multi-NER server.
Could you please share logs/nohup_multi_ner.out so that we can figure out what's causing the problem?

Thanks for the hint, I was able to fix the first problem by running script with sudo, it was a permission error. But now I have the same problem with tmVarJava:
FileNotFoundError: [Errno 2] No such file or directory: './resources/tmVarJava/output/0ee760de58f6bcfd46bd12453ebf632af84ef70592d5fb42d7ec5b61.PubTator.PubTator'
nohup_tmvar.out:

Starting tmVar 2.0 Service at 127.0.0.1:18896
Deleted a tmp file: tmp/a6d2905e425ecf265bd041fbc8edd80bd49582faa1d4049a16fa38be.PubTator.PostME
Deleted a tmp file: tmp/a6d2905e425ecf265bd041fbc8edd80bd49582faa1d4049a16fa38be.PubTator.PostME.ml
Deleted a tmp file: tmp/a6d2905e425ecf265bd041fbc8edd80bd49582faa1d4049a16fa38be.PubTator.ME
Deleted a tmp file: tmp/a6d2905e425ecf265bd041fbc8edd80bd49582faa1d4049a16fa38be.PubTator.PostME.data
Deleted a tmp file: tmp/a6d2905e425ecf265bd041fbc8edd80bd49582faa1d4049a16fa38be.PubTator.data
Deleted a tmp file: tmp/a6d2905e425ecf265bd041fbc8edd80bd49582faa1d4049a16fa38be.PubTator.output
Deleted a tmp file: tmp/a6d2905e425ecf265bd041fbc8edd80bd49582faa1d4049a16fa38be.PubTator.PostME.output
Deleted a tmp file: tmp/a6d2905e425ecf265bd041fbc8edd80bd49582faa1d4049a16fa38be.PubTator.location
Reading POS tagger model from lib/taggers/english-left3words-distsim.tagger ... done [1.9 sec].
Loading tmVar : Processing Time:2.193sec
Ready
Exception in thread "main" java.lang.IllegalArgumentException: Empty command
	at java.lang.Runtime.exec(Runtime.java:445)
	at java.lang.Runtime.exec(Runtime.java:348)
	at tmVarlib.PostProcessing.toPostMEoutput(PostProcessing.java:1686)
	at kr.ac.korea.dmis.tmVar2.tag_ner(tmVar2.java:278)
	at kr.ac.korea.dmis.tmVar2Server.run(tmVar2Server.java:48)
	at kr.ac.korea.dmis.tmVar2Server.<init>(tmVar2Server.java:29)
	at kr.ac.korea.dmis.tmVar2Server.main(tmVar2Server.java:89)

Thanks for sharing.

tmVarJava checks OS type (e.g., Windows or Linux) and make command depending on it. Could you please let us know the OS you are using?

I'm on MacOS

Thank you for letting us know.

Unfortunately, tmVarJava currently does not support MacOS.
We'll get to work on it and get back to you as soon as it's finished.

Oh, thanks for the update
Regards

Hi, @dmytrobabych

Many thanks for your patience.
We've just released BERN2 v1.1 which supports MacOS.
Please follow the steps below to download the source code and resource files.

git clone -b v1.1.0 git@github.com:dmis-lab/BERN2.git
wget https://nlp.dmis.korea.edu/projects/bern2-sung-et-al-2022/resources_v1.1.tar.gz