Skip to content

Commit

Permalink
fix __file__ not found problem.
Browse files Browse the repository at this point in the history
this is a known issue of sphinx-gallery
sphinx-gallery/sphinx-gallery#211
  • Loading branch information
huajsj committed Jun 8, 2022
1 parent 152913c commit 8d2bfc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gallery/how_to/work_with_relay/using_with_pipeline_executor.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ def get_network():
# -----------------------------------------
# We use an testing linear graph splitting function as a example. User also can create their
# own splitting function logic.
import inspect
import os

test_path = os.path.join(os.path.dirname(__file__), "../../../tests/python/relay")
os.sys.path.append(test_path)
test_path = os.path.dirname(inspect.getfile(lambda: None))
os.sys.path.append(os.path.join(test_path, "../../../tests/python/relay"))
from test_pipeline_executor import graph_split

###########################################
Expand Down

0 comments on commit 8d2bfc3

Please sign in to comment.