-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make Grafzahl look for conda in the right place #24
Comments
Also please tell me the output of reticulate::conda_list() |
Sure!
|
No, wait! Don't no what made the difference, but now I consistently get the correct (?) output for the option
The slashes are all mixed up. Maybe that's an issue? |
@ureber Could you please try this in your command line environment (cmd.exe)? C:\Users\ur21m712\AppData\Local\miniconda3\envs\grafzahl_condaenv_cuda\python.exe Do you get a Python console? Short explanation: I don't have Windows to test this package. Therefore, the support is not as great. For example, I don't know the directory structure of a miniconda install on Windows is different from other *nix systems.
|
Yes, I get a Python console (3.10.12). I'm afraid I can't be of much help here, as my experience with conda on Windows is limited to this server (which is not mine). |
This comment was marked as resolved.
This comment was marked as resolved.
Also the upstream problem of ThilinaRajapakse/simpletransformers#1539
@ureber Could you please give this a try (The GPU support for Windows is still WIP)? remotes::install_github("chainsawriot/grafzahl@windows")
setup_grafzahl(cuda = FALSE)
detect_conda()
detect_cuda() # FALSE
model <- grafzahl(unciviltweets, model_type = "bertweet", model_name = "vinai/bertweet-base") |
If you don't like to setup the conda environment afresh. remotes::install_github("chainsawriot/grafzahl@windows")
require(grafzahl)
Sys.setenv("GRAFZAHL_MINICONDA_PATH" = "C:\Users\ur21m712\AppData\Local\miniconda3")
detect_conda()
detect_cuda()
model <- grafzahl(unciviltweets, model_type = "bertweet", model_name = "vinai/bertweet-base") |
Thanks for the quick support. I tried both options. First the latter one, without a new installation of conda. As before, detect_conda() returned FALSE. I then ran the setup again, which produced the following error. Running detect_conda() led to TRUE, however.
|
And yes, I found this issue while fixing this: ThilinaRajapakse/simpletransformers#1539 And the CPU support in the pull request has a temp. fix #25 to this. In order to fix this in your GPU miniconda install now, with your Conda console conda activate grafzahl_condaenv_cuda
python -m pip uninstall simpletransformers
python -m pip uninstall transformers
python -m pip uninstall scipy
python -m pip install simpletransformers "transformers==4.30.2" "scipy==1.10.1"
conda deactivate |
This made it work! Both detect_conda() and detect_cuda() now return TRUE and also fine-tuning the model with grafzahl() works. I'm not entirely sure which installation it's running on, although judging by the speed, it's probably the GPU one. |
Hi there,
I'm having a bit of trouble getting Grafzahl to look for miniconda in the right place. Since I had to install miniconda manually, it's not in the usual folder (r-miniconda), but some other (miniconda3). I saw that this was an issue before (#20) and tried to solve it by specifying the right path for both
RETICULATE_MINICONDA_PATH
andGRAFZAHL_MINICONDA_PATH
. However,detect_conda()
still returnsFALSE
.The problem, I suspect, is that the
.gen_conda_path
function adds "bin" and "conda" to the path, which then points to a folder/file that doesn't exist within miniconda3. In my case, the right path would be "condabin" and then "conda" (I guess). I don't know if this is a version or system related issue, but any idea on how to fix this or some workaround would be greatly appreciated.Thanks!
The text was updated successfully, but these errors were encountered: