Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path encoding for cross-method utility functions #234

Open
Jieran-S opened this issue Feb 26, 2024 · 0 comments
Open

Path encoding for cross-method utility functions #234

Jieran-S opened this issue Feb 26, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Jieran-S
Copy link
Member

Following the discussion in #230 : If we have a utility function to convert resolution to n_clust store in /method/search_res,py, and we use this function in multiple methods, currently this is how we load the function in our scripts:

# import res-n_clust tuning function
import sys
from pathlib import Path
# Add the parent directory of the current file to sys.path
method_dir = Path(__file__).resolve().parent.parent # Navigate two levels up
sys.path.append(str(method_dir))
from search_res import binary_search

Yet this current solution is not ideal as it is hard to track which method uses this function. Is there any better idea to deal with this issue?

@Jieran-S Jieran-S added enhancement New feature or request help wanted Extra attention is needed labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant