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

Make it work on Colab #18

Closed
chainsawriot opened this issue Jan 20, 2023 · 3 comments
Closed

Make it work on Colab #18

chainsawriot opened this issue Jan 20, 2023 · 3 comments
Labels

Comments

@chainsawriot
Copy link
Collaborator

The idea probably would be: Make grafzahl usable with non-Conda Python, e.g. the Python provided by Colab. As of writing, that's 3.8.

Install all the Python dependencies: pandas, emoji, tqdm, simpletransformers

@chainsawriot
Copy link
Collaborator Author

Initial experiment suggests this is possible with Colab's R runtime.

system("python3 -m pip install simpletransformers", intern = TRUE)
install.packages("reticulate")
writeLines("import torch\ndef py_detect_cuda():\n    return(torch.cuda.is_available())", "cuda2.py")
reticulate::source_python("cuda2.py")
py_detect_cuda()

@chainsawriot
Copy link
Collaborator Author

chainsawriot commented Mar 20, 2024

Initial idea is to rewrite this:

https://github.com/chainsawriot/grafzahl/blob/d0e91b24ba2402d214b9a65bcc628e68a20e37b8/R/setup.R#L54-L70

  • So that it won't assume conda.
  • Provide a setup script for use with Colab

@chainsawriot
Copy link
Collaborator Author

  • Vignette
  • Customization guide (for different python environments - conda, miniconda, native python)

chainsawriot added a commit that referenced this issue Mar 22, 2024
* Add nonconda mode

* Update

* Warning

* Add `use_conda`

Also changed the option to `grafzahl.nonconda`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant