Model creation outside repo directory
georgeYanch opened this issue · 1 comments
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?
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...