New quadstore !

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

New quadstore !

Jiba
Administrator
Hi all,

I implemented a new quadstore for Owlready. It allows numeric search (e.g. all patients with age > 65) and is also slighly faster.

The new quadstore validates all my test; however, it would be nice if a few other persons could try and test it.

For testing, you can use the owlready2/test/regtest.py regression test suite, and obviously any Owlready2-based program you have.

Best regards,
Jiba
gp
Reply | Threaded
Open this post in threaded view
|

Re: New quadstore !

gp
Hello JB,

I downloaded the dev version from bitbucket and let most of my scripts run with it and so far so good.

I did try to run the test suite and most tests failed. I did not investigate much more than this the issue though as I might have something misconfigured here.

One of the outputs:
F
test\regtest.py:2349 (Test.test_annotation_5)
self = <regtest.Test testMethod=test_annotation_5>

    def test_annotation_5(self):
      n = self.new_ontology()
      with n:
        class C1(Thing): pass
        class C2(Thing): pass
        class prop(ObjectProperty): pass
        class annot(AnnotationProperty): pass
    
      c1 = C1()
      c2 = C2()
      c1.prop.append(c2)
    
      annot[c1, prop, c2].append(locstr("Un test", "fr"))
      annot[c1, prop, c2].append(locstr("A test", "en"))
    
      annot[c1, prop, c2] = ["Test"]
      annots = None
>     for bnode, p, o in n.get_objs_spo_spo(None, rdf_type, owl_axiom):
E     TypeError: 'NoneType' object is not callable

regtest.py:2367: TypeError


I can also pass you the full blown html report as generated by pycharm but I did not want to clutter the thread.

Reply | Threaded
Open this post in threaded view
|

Re: New quadstore !

Jiba
Administrator
Hello GP, and thank you for trying the new quadstore!

Are you sure you are using the development version of Owlready? These methods does exist, but they are new. Maybe you are running the new test suite on the old version?

I've added a print at the beginning of regtest.py to identify the version of Owlready2 tested, could you try it?

Best regards,
Jiba
gp
Reply | Threaded
Open this post in threaded view
|

Re: New quadstore !

gp
Let's check I did things in order. I just reproduced the failing test following this procedure. I just do not use mercurial, so already in the beginning things might go wild.

1. uninstalled the current owlready2 installation
-> import owlready2 returns some error
2. went to the owlready bitbucket cloned directory and did "hg pull" then "hg update"
-> can see in regtest.py@line 18  the command "print("Testing Owlready2 version 2-%s located in %s" % (VERSION, owlready2.__file__))" so I assume this is indeed the last version
3. did "python setup.py install" (as "pip install -e ." somehow did not work on my system)
-> import owlready2 works
4. in some ipython environment went to the test folder of the hg clone, ran "%run regtest.py" and got the following first line
..EEEE............................................................................................................E.........E....................................................E...............................................................EE......................
followed by the corresponding error details.
Using the console the details are a bit different from the pycharm outputs though, here is one:
======================================================================
ERROR: test_reasoning_paper_ic2015 (__main__.Paper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\temp\owlready2\test\regtest.py", line 4656, in test_reasoning_paper_ic2015
    sync_reasoner(world, debug = 0)
  File "C:\winpython370amd64_running\python-3.7.0.amd64\lib\site-packages\owlready2-0.11-py3.7-win-amd64.egg\owlready2\reasoning.py", line 123, in sync_reasoner_hermit
    output = output.decode("utf8").replace("\r","")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 827: invalid continuation byte

Unfortunately I did not run the testsuite using the console before updating again so things might have changed here. Pycharm still returns many failed tests, looks like they are the same.

Any hint as of a way to improve my owlready2 testing skills?

Some extra infos:
I use winpython370amd64 as basic install. It is heavily overloaded with other packages that I need (even involving with some R integration thingies) so this might as well be the source of the problems.

Cheers,
GP
gp
Reply | Threaded
Open this post in threaded view
|

Re: New quadstore !

gp
Some update again:

I performed the tests again using a clean winpython install (+rdflib installed). Things look cleaner with most tests failing having to do with the reasoner (I guess the JAVA environment is not set properly or something like this) or deal with some wrong encoding (juste like the example above).

So these are issues which do not seem to be related with the backend functionalities.

I am sorry I cannot find much more time to dig into this, but I am happy to follow some advise if you would have a specific question.
Reply | Threaded
Open this post in threaded view
|

Re: New quadstore !

Jiba
Administrator
Hi,

Thank you for these additional tests!
Encoding problems are probably also related to Java -- in case of problem, the output may be in local encoding instead of the expected UTF8, thus causing problem.

So it seems that the new quadstore is ok,

Jiba