yahoo / lopq

Training of Locally Optimized Product Quantization (LOPQ) models for approximate nearest neighbor search of high dimensional data in Python and Spark.
Apache License 2.0
562 stars 130 forks source link

[MRG] Fix relative imports & improve package discovery #24

Open mohamed-ali opened 5 years ago

mohamed-ali commented 5 years ago

Fixes #20.

As described in pep-0404:

In Python 3, implicit relative imports within packages are no longer available - only absolute imports and explicit relative imports are supported.

The solution to the recent import problems, that is compatible with both python2 and python3 is to use explicit relative import.

A more thorough discussion about this subject can be found here.

This PR:

yahoocla commented 5 years ago

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! :smile:

mohamed-ali commented 5 years ago

CLA signed.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 88.443% when pulling 1f5834d2595275642d867c43247de697a7f210e3 on mohamed-ali:fix-relative-imports into 0f17655b901e6dfabe5c2aa62b4c8e492f34b05a on yahoo:master.

mohamed-ali commented 5 years ago

@pumpikano could you have a look at this PR, it fixes the import problem in python3 and is compatible with both python2 & 3.