BlueBrain / BlueGraph

Python framework for graph analytics and co-occurrence analysis
https://bluegraph.readthedocs.io
Apache License 2.0
31 stars 5 forks source link

Hotfix/missing dependency (colab fails) #82

Closed eugeniashurko closed 3 years ago

eugeniashurko commented 3 years ago

Fixed a new error occuring in Colab:

ModuleNotFoundError                       Traceback (most recent call last)

<ipython-input-2-54c8628577b8> in <module>()
      9 from kgforge.core import KnowledgeGraphForge
     10 
---> 11 from cord19kg.utils import (generate_curation_table,
     12                            link_ontology,
     13                            generate_cooccurrence_analysis,

6 frames

/usr/local/lib/python3.7/dist-packages/bluegraph/downstream/similarity.py in <module>()
     18 import pickle
     19 
---> 20 import faiss
     21 import os
     22 import warnings

ModuleNotFoundError: No module named 'faiss'

Installation of faiss is not necessary for running the cord-19 example. This error occured because of the newly introduced and undesirable dependency of bluegraph.preprocess on bluegraph.downstream.data_structures (the later requires faiss). Resolved the dependency by moving interface classes not related to downstream tasks from downstream.data_structures to their respective packages.

codecov-commenter commented 3 years ago

Codecov Report

Merging #82 (eb70b31) into master (3bb2e75) will not change coverage. The diff coverage is 73.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #82   +/-   ##
=======================================
  Coverage   81.16%   81.16%           
=======================================
  Files          41       41           
  Lines        3680     3680           
=======================================
  Hits         2987     2987           
  Misses        693      693           
Impacted Files Coverage Δ
bluegraph/downstream/__init__.py 100.00% <ø> (ø)
bluegraph/downstream/data_structures.py 86.11% <ø> (+1.86%) :arrow_up:
bluegraph/core/embed/embedders.py 81.67% <64.28%> (-0.97%) :arrow_down:
bluegraph/core/utils.py 85.71% <72.72%> (-3.18%) :arrow_down:
bluegraph/core/io.py 64.12% <73.77%> (ø)
bluegraph/backends/networkx/analyse/communities.py 95.08% <100.00%> (ø)
bluegraph/preprocess/encoders.py 79.18% <100.00%> (ø)
bluegraph/preprocess/utils.py 96.87% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3bb2e75...eb70b31. Read the comment docs.