Reporting an error that I did manage to fix on my own but thought you should be aware of.
Heads up: I'm running dvt as a git submodule which I then install into my virtual environment (which i suspect could be linked to the problem).
I was trying to run dvt.AnnoShotBreaks(), and dvt attempted to download this file : https://github.com/distant-viewing/dvt/releases/download/0.0.1/dvt_detect_shots.pt (I'm assuming a ML model?)
I was getting the following error:
Traceback (most recent call last):
File "/Users/jacob/Documents/Git Repos/plozevet-archive/Scripts/DVT-Tests/breakpoint-test.py", line 23, in <module>
process(params)
File "/Users/jacob/Documents/Git Repos/plozevet-archive/Scripts/DVT-Tests/breakpoint-test.py", line 19, in process
anno_breaks = dvt.AnnoShotBreaks()
File "/Users/jacob/Documents/Git Repos/plozevet-archive/venv/lib/python3.10/site-packages/dvt/shots.py", line 26, in __init__
model_path = _download_file("dvt_detect_shots.pt")
File "/Users/jacob/Documents/Git Repos/plozevet-archive/venv/lib/python3.10/site-packages/dvt/utils.py", line 135, in _download_file
download_url_to_file(url, cached_file, hash_prefix, progress=True)
File "/Users/jacob/Documents/Git Repos/plozevet-archive/venv/lib/python3.10/site-packages/torch/hub.py", line 625, in download_url_to_file
f = tempfile.NamedTemporaryFile(delete=False, dir=dst_dir)
File "/usr/local/Cellar/python@3.10/3.10.12/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tempfile.py", line 559, in NamedTemporaryFile
file = _io.open(dir, mode, buffering=buffering,
File "/usr/local/Cellar/python@3.10/3.10.12/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tempfile.py", line 556, in opener
fd, name = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/usr/local/Cellar/python@3.10/3.10.12/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tempfile.py", line 256, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/jacob/.cache/torch/hub/checkpoints/tmps3k5bm1g'
In the end I went and manually created the path /torch/hub/checkpoints/. Sounds like a problem that could be easily resolved with a Path(dir).mkdir(parents=True) ? Or maybe the issue is my submodule/venv setup.
Anyway, all working my end and having fun with the toolkit!
Hi there!
Great work on this, this is excellent.
Reporting an error that I did manage to fix on my own but thought you should be aware of.
Heads up: I'm running dvt as a git submodule which I then install into my virtual environment (which i suspect could be linked to the problem).
I was trying to run
dvt.AnnoShotBreaks()
, and dvt attempted to download this file :https://github.com/distant-viewing/dvt/releases/download/0.0.1/dvt_detect_shots.pt
(I'm assuming a ML model?)I was getting the following error:
In the end I went and manually created the path
/torch/hub/checkpoints/
. Sounds like a problem that could be easily resolved with aPath(dir).mkdir(parents=True)
? Or maybe the issue is my submodule/venv setup.Anyway, all working my end and having fun with the toolkit!