CogComp / cogcomp-nlpy

CogComp's light-weight Python NLP annotators
http://nlp.cogcomp.org/
Other
116 stars 26 forks source link

Local Pipeline not working (Fail to load models) #130

Open flackbash opened 1 month ago

flackbash commented 1 month ago

Hello,

when using the local pipeline because the remote pipeline does not seem to be available anymore (see #129), I get the following message

INFO:ccg_nlpy.pipeline_config:Using local pipeline
ERROR:ccg_nlpy.local_pipeline:Fail to load models, please check if your Java version is up to date.
ERROR:ccg_nlpy.local_pipeline:JVM exception occurred: edu/illinois/cs/cogcomp/pipeline/main/PipelineFactory java.lang.NoClassDefFoundError

Here is some information about my Java installation

# echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64/
# java -version
openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build 1.8.0_362-8u372-ga~us1-0ubuntu1~18.04-b09)
OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)

I removed old models and downloaded them again as suggested in #122 but the error persists.

Any help is appreciated.

flackbash commented 1 month ago

The problem is that the models cannot be downloaded, even though the download command ended with Model download successful.

# python3 -m ccg_nlpy download
INFO:ccg_nlpy.download:Starting download
INFO:ccg_nlpy.download:/root/.ccg_nlpy/pom.xml
INFO:ccg_nlpy.download:Creating pom file
INFO:ccg_nlpy.download:Root Directory = /root/.ccg_nlpy/
INFO:ccg_nlpy.download:Model Directory = /root/.ccg_nlpy/model_4.0.12
INFO:ccg_nlpy.download:b'[INFO] Scanning for projects...\n[INFO] \n[INFO] -------------< org.cogcomp:ccg_nlpy-pipeline-dependencies >-------------\n[INFO] Building ccg_nlpy-pipeline-dependencies 1.0-SNAPSHOT\n[INFO]   from pom.xml\n[INFO] --------------------------------[ jar ]---------------------------------\n[INFO] ------------------------------------------------------------------------\n[INFO] BUILD FAILURE\n[INFO] ------------------------------------------------------------------------\n[INFO] Total time:  0.230 s\n[INFO] Finished at: 2024-07-17T11:29:38Z\n[INFO] ------------------------------------------------------------------------\n[ERROR] Failed to execute goal on project ccg_nlpy-pipeline-dependencies: Could not collect dependencies for project org.cogcomp:ccg_nlpy-pipeline-dependencies:jar:1.0-SNAPSHOT\n[ERROR] Failed to read artifact descriptor for edu.illinois.cs.cogcomp:illinois-nlp-pipeline:jar:4.0.12\n[ERROR] \tCaused by: The following artifacts could not be resolved: edu.illinois.cs.cogcomp:illinois-nlp-pipeline:pom:4.0.12 (absent): Could not transfer artifact edu.illinois.cs.cogcomp:illinois-nlp-pipeline:pom:4.0.12 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [CogcompSoftware (http://cogcomp.org/m2repo/, default, releases+snapshots)]\n[ERROR] \n[ERROR] -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException\n'
INFO:ccg_nlpy.download:Model download successful.

So the problem seems to be that the server hosting the models is down, just like the server hosting the remote pipeline, rendering ccg_nlpy unusable.

danyaljj commented 1 month ago

This library is somewhat outdated now (not much activity in the recent few years). I suggest you try other libraries (e.g., Huggingface model hub) for better models.