capreolus-ir/capreolus

unknown error

Closed this issue · 1 comments

Upon executing the following command I received an error that I do not understand. Error pasted below. I am running on a Linux machine, java 11.0.10. What could be the problem?

capreolus rerank.traineval with benchmark.name=msmarcopsg rank.searcher.index.stemmer=porter rank.searcher.name=BM25 rank.optimize=recall_1000 reranker.name=KNRM reranker.trainer.niters=2 optimize=map

Error:

2021-04-18 11:25:55.977718: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/toobasalahuddin/capreolus/capreolus/run.py", line 96, in <module>
    task, task_entry_function = prepare_task(arguments["COMMAND"], config)
  File "/home/toobasalahuddin/capreolus/capreolus/run.py", line 34, in prepare_task
    task = Task.create(taskstr, config)
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 222, in create
    module_obj = module_cls(config, provide, share_dependency_objects=share_objects)
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 274, in __init__
    self._instantiate_dependencies(self.config, provide, share_dependency_objects)
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 314, in _instantiate_dependencies
    dependencies[dependency.key] = dependency_cls.create(
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 222, in create
    module_obj = module_cls(config, provide, share_dependency_objects=share_objects)
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 274, in __init__
    self._instantiate_dependencies(self.config, provide, share_dependency_objects)
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 314, in _instantiate_dependencies
    dependencies[dependency.key] = dependency_cls.create(
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 222, in create
    module_obj = module_cls(config, provide, share_dependency_objects=share_objects)
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 274, in __init__
    self._instantiate_dependencies(self.config, provide, share_dependency_objects)
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 314, in _instantiate_dependencies
    dependencies[dependency.key] = dependency_cls.create(
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 222, in create
    module_obj = module_cls(config, provide, share_dependency_objects=share_objects)
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/profane/base.py", line 279, in __init__
    self.build()
  File "/home/toobasalahuddin/capreolus/capreolus/tokenizer/anserini.py", line 15, in build
    self._tokenize = self._get_tokenize_fn()
  File "/home/toobasalahuddin/capreolus/capreolus/tokenizer/anserini.py", line 18, in _get_tokenize_fn
    from jnius import autoclass
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/jnius/__init__.py", line 42, in <module>
    from .reflect import *  # noqa
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/jnius/reflect.py", line 17, in <module>
    class Class(with_metaclass(MetaJavaClass, JavaClass)):
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/site-packages/six.py", line 856, in __new__
    return meta(name, resolved_bases, d)
  File "jnius/jnius_export_class.pxi", line 114, in jnius.MetaJavaClass.__new__
  File "jnius/jnius_export_class.pxi", line 164, in jnius.MetaJavaClass.resolve_class
  File "jnius/jnius_env.pxi", line 11, in jnius.get_jnienv
  File "jnius/jnius_jvm_dlopen.pxi", line 118, in jnius.get_platform_jnienv
  File "jnius/jnius_jvm_dlopen.pxi", line 70, in jnius.create_jnienv
  File "jnius/jnius_jvm_dlopen.pxi", line 47, in jnius.find_java_home
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/toobasalahuddin/anaconda3/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['which', 'javac']' returned non-zero exit status 1.

I think that the Java 11 JRE is installed, but you need the Java 11 JDK, which includes the javac compiler. The last line indicates javac couldn't be found.