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

Model creation outside repo directory #22

Open
georgeYanch opened this issue Oct 23, 2023 · 1 comment
Open

Model creation outside repo directory #22

georgeYanch opened this issue Oct 23, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@georgeYanch
Copy link

Hi, I need to create model outside sam-pt directory

For now I get the following error
error locating target sam_pt.modelling.sam_pt.SamPt

How do I change _target_ in config in order this to work?

@m43
Copy link
Collaborator

m43 commented Dec 3, 2023

Hi @georgeYanch, a dirty workaround would be to add the root directory of SAM-PT to your PYTHONPATH. For example, this can be done by executing export PYTHONPATH="${PYTHONPATH}:/path/to/sam-pt" in your terminal. Replace /path/to/sam-pt with the actual path to your sam-pt root (not to the sam_pt subfolder, but the root of the cloned repo). This should allow Python to locate the sam_pt.modelling.sam_pt.SamPt module when running your script from outside the SAM-PT directory.

A clean solution would be to, for example, make sam-pt a package that can be installed via pip...

@m43 m43 added the enhancement New feature or request label Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants