Skip to content

Commit

Permalink
Use the file path to find the rebench location
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Nov 8, 2024
1 parent fef47f2 commit b3646fc
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions rebench/denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,8 @@ def get_denoise(self):

def get_denoise_python_path(self):
if self._denoise_python_path is None:
active_python_path = sys.path
current_file = os.path.abspath(__file__)

# find the element in active_python_path that has the start of the current file path
for path in active_python_path:
if current_file.startswith(path) and "rebench" in path.lower():
self._denoise_python_path = path
return path

self._denoise_python_path = False
self._denoise_python_path = os.path.dirname(os.path.dirname(current_file))

return self._denoise_python_path

Expand Down

0 comments on commit b3646fc

Please sign in to comment.