AnacletoLAB / grape

🍇 GRAPE is a Rust/Python Graph Representation Learning library for Predictions and Evaluations
MIT License
502 stars 38 forks source link

NameError: name 'HASWELL_FLAGS' is not defined #18

Closed caufieldjh closed 1 year ago

caufieldjh commented 1 year ago

Another hardware-related oddity, courtesy of our aging build server. When I import grape, it raises NameError: name 'HASWELL_FLAGS' is not defined - this is on our build server, where we previously had issues with missing AVX flags. In this case, I'm also in a Docker container and in a virtualenv, but it happens outside that env, too.

Python 3.9.5 (default, Nov 23 2021, 15:27:38)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import grape
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/.cache/pypoetry/virtualenvs/semsim-op1wFzG_-py3.9/lib/python3.9/site-packages/grape/__init__.py", line 9, in <module>
    from embiggen import *
  File "/root/.cache/pypoetry/virtualenvs/semsim-op1wFzG_-py3.9/lib/python3.9/site-packages/embiggen/__init__.py", line 2, in <module>
    from embiggen.visualizations import GraphVisualizer
  File "/root/.cache/pypoetry/virtualenvs/semsim-op1wFzG_-py3.9/lib/python3.9/site-packages/embiggen/visualizations/__init__.py", line 2, in <module>
    from embiggen.visualizations.graph_visualizer import GraphVisualizer
  File "/root/.cache/pypoetry/virtualenvs/semsim-op1wFzG_-py3.9/lib/python3.9/site-packages/embiggen/visualizations/graph_visualizer.py", line 17, in <module>
    from ensmallen import Graph  # pylint: disable=no-name-in-module
  File "/root/.cache/pypoetry/virtualenvs/semsim-op1wFzG_-py3.9/lib/python3.9/site-packages/ensmallen/__init__.py", line 27, in <module>
    ).format(HASWELL_FLAGS, unavailable_flags)
NameError: name 'HASWELL_FLAGS' is not defined

Looks like this could fail more gracefully, at least.

zommiommy commented 1 year ago

Yeah, my bad, I'm going to fix it and push it as soon as possible.

In the meanwhile you can patch it out by removing from line 22 to line 28 of the file /root/.cache/pypoetry/virtualenvs/semsim-op1wFzG_-py3.9/lib/python3.9/site-packages/ensmallen/__init__.py

LucaCappelletti94 commented 1 year ago

Resolved with version 0.1.24.