camlspotter / learnHA

Learns a hybrid automaton model from trajectories of Cyber-Physical Systems.
GNU General Public License v3.0
0 stars 0 forks source link

libsvm carries binaries #3

Open camlspotter opened 1 month ago

camlspotter commented 1 month ago

This is unsettling to me:

$ find infer_ha/libsvm/ | grep 'exe\|so'
infer_ha/libsvm/windows/svm-scale.exe
infer_ha/libsvm/windows/svm-train.exe
infer_ha/libsvm/windows/svm-predict.exe
infer_ha/libsvm/windows/svm-toy.exe
infer_ha/libsvm/lib/libsvm.so.2
camlspotter commented 1 month ago

It looks like a copy https://pypi.org/project/libsvm/ . Why this is required? Cannot we install the official libsvm instead?

camlspotter commented 1 month ago

infer_ha.test_svm of run_tests fails out of the box:

======================================================================
ERROR: infer_ha.test_svm (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: infer_ha.test_svm
Traceback (most recent call last):
  File "/home/jun/.pyenv/versions/3.8.19/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/jun/.pyenv/versions/3.8.19/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/home/jun/hal/learnHA/infer_ha/test_svm.py", line 4, in <module>
    from libsvm.svmutil import svm_train, svm_predict, svm_problem, svm_parameter
ModuleNotFoundError: No module named 'libsvm'

infer_ha/ has a copy of libsvm but not properly loaded at tests. Weird...

camlspotter commented 1 month ago

I concluded that tests use different versions of libsvm!