clulab / reach

Reach Biomedical Information Extraction
Other
96 stars 39 forks source link

trying to integrate bionlp processors from reach in odinson #802

Open Crispae opened 10 months ago

Crispae commented 10 months ago

Hi, I am trying to integrate bionlp processors from reach in odinson. With sbt i tried to load the dependency using this

libraryDependencies ++= Seq("com.twosixlabs.dart" %% "odinson-api" % "3.0.16",
"org.clulab" %% "reach-main" % "1.6.2")

I am using odinson-api from dart , and integrating bionlp processors in it, but could not import it. While importing,

warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading org.clulab:reach-processors_2.12:1.6.2
[error]   Not found
[error]   Not found
[error]   not found: /home/saurav/.ivy2/localorg.clulab/reach-processors_2.12/1.6.2/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom
[error]   not found: https://jcenter.bintray.com/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom
[error]   not found: http://artifactory.cs.arizona.edu:8081/artifactory/sbt-release/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom
[error]   not found: /home/saurav/.ivy2/local/default/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom
[error]         at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:344)
[error]         at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:313)
[error]         at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]         at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:313)
[error]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:60)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:134)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:74)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:147)
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:147)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:128)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:161)
[error]         at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3801)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error]         at sbt.Execute.work(Execute.scala:292)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:829)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading org.clulab:reach-processors_2.12:1.6.2
[error]   Not found
[error]   Not found
[error]   not found: /home/saurav/.ivy2/localorg.clulab/reach-processors_2.12/1.6.2/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom
[error]   not found: https://jcenter.bintray.com/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom
[error]   not found: http://artifactory.cs.arizona.edu:8081/artifactory/sbt-release/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom
[error]   not found: /home/saurav/.ivy2/local/default/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom

While inspecting the error, it looks like follow transitive dependency because when we include

"org.clulab" % "reach-main_2.12" % "1.6.2"

as dependency, it pulls in not only the 'reach-main' JAR but also its transitive dependencies specified in its POM file

<dependency>
<groupId>org.clulab</groupId>
<artifactId>reach-processors_2.12</artifactId>
<version>1.6.2</version>
</dependency>

But it's is not able locate this file.

can you please look into this issue. I am using scalaVersion= 2.12.7 and sbt.version=1.9.6

Thank you, for this project

bgyori commented 10 months ago

Are you trying to run Odinson with the BioNLPProcessor for annotating text? If so, I have recently set that up and can potentially help.

Crispae commented 10 months ago

Thanks @bgyori that would be really great.

Crispae commented 10 months ago

@bgyori if implementation is in your repo, please provide the link?

kwalcock commented 10 months ago

Thanks, @bgyori. That would be very welcome.

Crispae commented 10 months ago

Thanks @bgyori it works!

Steps:

  1. Add .aggregate(processors, main, causalAssembly, export, bioresources) in root of reach build.sbt
  2. run sbt in the root directory of reach and then in cli run publishLocal. Publish local will compile and build file of reach-processor and store it in ~/.ivy2/local/.
  3. If running odinson directly from repo then do the changes in odinson as mentioned by @bgyori , if using odinson-api from dart-clulab, for your project then, add following dependencies.
    libraryDependencies ++= Seq(
    "com.twosixlabs.dart" %% "odinson-api" % "3.0.16",
    "org.clulab" %% "reach-processors" % "1.6.3-SNAPSHOT")

    in your project build.sbt

    1. Then your project you can import BioNLPProcessor import org.clulab.processors.bionlp.BioNLPProcessor