Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEMPRE with Java 17? #228

Open
therealansh opened this issue Nov 3, 2021 · 2 comments
Open

SEMPRE with Java 17? #228

therealansh opened this issue Nov 3, 2021 · 2 comments

Comments

@therealansh
Copy link

Hey, so I tried building Sempre with Java 17 for REGEL project but I am having trouble. Firstly, I am using Java 17 and IntelliJ Idea as the IDE. Starting from, building I did the dependencies pull (./pull-dependencies ...) and they installed perfectly. Altho, once I start building regex for semparse I run into multiple errors of

error: package org.omg.PortableInterceptor does not exist

but since they are not used anywhere I simply solved it by commenting it. And once I again run it, I face an error of ClassNotFoundException.

Grammar.readjava.lang.RuntimeException: java.lang.ClassNotFoundException: edu.stanford.nlp.sempre.sketch.UnarySketchFn

At first, I thought this might be a Java 17 issue but I guess Java is backward compatible and could work with java 1.8? (correct me if I am wrong?) .

Steps to reproduce

  1. Clone REGEL
cd sempre/ 
./pull-dependencies core \                                                                     
./pull-dependencies corenlp \
./pull-dependencies tables \
./pull-dependencies freebase
cd ..
python3 synthesize_benchmark.py    

This might throw an error of file not found its because sempre couldn't finish up the subprocess. But for forwards steps it produces the necessary file. For more logs you can try:

cd sempre/
python3 py_scripts/test.py --dataset _tmp --model_dir pretrained_models/pretrained_so --topk 25

This is the command that throws an error.
Hoping to find a way out Thanks in advance

@therealansh
Copy link
Author

I have opened an issue at REGEL as well #14 this highlights most of the errors I run into.

@ppasupat
Copy link
Collaborator

ppasupat commented Nov 3, 2021

edu.stanford.nlp.sempre.sketch.UnarySketchFn looks like a custom class implemented in REGEL and is not in the original SEMPRE.

In REGEL's sempre/py_scripts/test.sh, could you try replacing the ant regex line with

ant core tables sketch regex

The current command (ant regex) does not have the sketch target and thus does not compile files in the sketch subpackage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants