pyllama
pyllama copied to clipboard
Error Downloading Models from Community on Winodws
I have cloded the repo, installed all requirements including the CMake and itree based on one of the reported issues, still I run into the following traceback error when trying to download the model via:
python -m llama.download
or
python -m llama.download --folder .\models\
Exception has occurred: FileNotFoundError
[Errno 2] No such file or directory: '/tmp/error.njkfo9xztnqw.log'
File "C:\Users\majmo\Git\pyllama\llama\download.py", line 17, in download
retcode = hiq.execute_cmd(cmd, verbose=True, shell=True, runtime_output=True)
File "C:\Users\majmo\Git\pyllama\llama\download.py", line 87, in <module>
download(args)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/error.njkfo9xztnqw.log'
I have tried to see what I can change, but it was nor clear what hiq does actually when executing at line 17!
You need to install wget
.
Try pip install hiq-python -U
.
The nature of the problem changes when installing wget and upgrading hiq-python, now I get:
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\majmo\Git\pyllama\llama\download.py", line 90, in <module>
download(args)
File "C:\Users\majmo\Git\pyllama\llama\download.py", line 18, in download
retcode = hiq.execute_cmd(cmd, verbose=False, shell=True, runtime_output=True)
File "C:\Users\majmo\Git\pyllama\venv\lib\site-packages\hiq\utils.py", line 101, in execute_cmd
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env if env else {})
File "C:\Program Files\Python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 87] The parameter is incorrect
It has to do with subprocesses execution of the cmd in Windows! Where is this issue mentioned? You labelled it as duplicate.
I will try it tomorrow and update here.
I found a workaround for this issues:
- if you are on windows you have to have WSL and bash installed to be able to run the download script.
- you have to have wget installed(in the linux version)
- HIQ seems to have an issue executing bash shell scripts in cmd
- What you can do is, manually create a version of the download script and add you director( in linux format) and add the model you want as a string
- now just use wsl and open bash in commandline and run the download script
- now you have your desired model installed and can continue with the setup. For the dev:
- I will try to write a .bat file for windows its possible to just check for OS and then execute either .sh or .bat depending on os
- will send commit