kwiver icon indicating copy to clipboard operation
kwiver copied to clipboard

kwiver python exception from C++-land based on import order

Open Purg opened this issue 5 years ago • 6 comments

With respect to the dev/overhaul-python-crall branch, if I happen to do the following I get the following abort error (with an exit code of 134 from python/ipython):

$ ipython
In [1]: import pretrainedmodels  
   ...: import kwiver.arrows.serialize.json 
   ...:                                                                                       
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Aborted (core dumped)

However, if I reverse the imports the error does not happen:

$ ipython
In [1]: import kwiver.arrows.serialize.json 
   ...: import pretrainedmodels                                                               

In [2]:  

Purg avatar Mar 11 '20 20:03 Purg

@Purg this issue has been resolved right?

as6520 avatar Apr 10 '20 19:04 as6520

I think this is effectively resolved with the learned caveat that there is a "minimum" PyTorch version that kwiver is "compatible" with, i.e. I think this happens with torch==1.1.0 but NOT with torch==1.4.0. If that context is acceptable that this is no longer and issue. If kwiver is intending to explicitly support earlier torch versions then either the load order caveat is just a thing to deal with or is something that should be address (unless not already fixed with a new version of kwiver?).

Purg avatar Apr 10 '20 20:04 Purg

If this is resolved, I will close the issue.

linus-sherrill avatar May 18 '20 20:05 linus-sherrill

I'm definitely off the side of the road at least. Is there motivation here for there to be documentation somewhere in the kwiver python stuff that, for pytorch compatibility, a version 1.4.0 or greater is required?

Purg avatar May 18 '20 21:05 Purg

I am not sure where we should document the compatibility issue

as6520 avatar May 19 '20 10:05 as6520

Are there docs for the new python stuff? If so, then a Q&A troubleshooting section to the end could be a start.

Purg avatar May 19 '20 13:05 Purg