From: Zain Jabbar <zaijab2000@gmail.com>
To: help-guix@gnu.org
Subject: Pytorch Versions
Date: Sun, 12 May 2024 17:00:33 -1000 [thread overview]
Message-ID: <CAH+UbWStZHecT39=Y3pjrMSYLwtsD0Arp-uTVzgUEamh6ZoeOg@mail.gmail.com> (raw)
Aloha Guix Help,
After a few years I decided to really want to sit down and learn Guix
deeply. In this email, I wish to understand the difference between using
Guile Scheme to interact with Guix and using Bash to interact with Guix.
QUESTION: Why does Guile Scheme not find some package symbols that the
command line can?
BACKGROUND:
Firstly, the output of =guix describe=
```
zjabbar@tao ~/code/leetcode$ guix describe
Generation 628 May 12 2024 14:46:41 (current)
guix 6ba29e0
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 6ba29e02108ed144da1234b4b5512ee03865dcf6
```
When I use =guix search python-pytorch= or use the Emacs Guix interface and
=M-x guix p n python-pytorch= I get three different versions of
=python-pytorch=: 1.13.1, 2.0.1, and 2.2.1.
They are all defined in =gnu/packages/machine-learning.scm=
Using =guix build python-pytorch= will build the latest version 2.2.1.
However, in Scheme,
```
(use-modules (gnu packages))
(specification->package "python-pytorch")
```
Returns the package 2.0.1. To my knowledge, we should be able to import the
Scheme module and use the symbol if it is exported directly or defined
using define-public. Hence, I expect the following,
```
(use-modules (gnu packages)
(gnu packages machine-learning))
(specification->package "python-pytorch") ;; 2.2.1
python-pytorch ;; 1.13.1
python-pytorch2 ;; 2.2.1
python-pytorch-for-r-torch ;; 2.0.1
```
Instead I get,
```
(use-modules (gnu packages)
(gnu packages machine-learning))
(specification->package "python-pytorch") ;; 2.0.1
python-pytorch ;; 1.13.1
python-pytorch2 ;; Unbound variable: python-pytorch2
python-pytorch-for-r-torch ;; 2.0.1
```
This means that the following code does not work because Guile does not
find version 2.2.1,
```
(use-modules (gnu packages)
(guix transformations))
((options->transformation '((with-input . "python-pytorch@1.13.1
=python-pytorch@2.2.1")))
(specification->package "python-torchvision"))
```
The following does also does not work,
```
(use-modules (gnu packages)
(guix packages))
((package-input-rewriting `((,python-pytorch . ,python-pytorch2)))
(specification->package "python-torchvision"))
```
--
Mahalo,
Zain Jabbar
next reply other threads:[~2024-05-13 18:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 3:00 Zain Jabbar [this message]
2024-05-13 21:35 ` Pytorch Versions Richard Sent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+UbWStZHecT39=Y3pjrMSYLwtsD0Arp-uTVzgUEamh6ZoeOg@mail.gmail.com' \
--to=zaijab2000@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).