GNU bug report logs - #70883
[PATCH] gnu: llama-cpp: Update to commit fed010.

Previous Next

Package: guix-patches;

Reported by: Andy Tai <atai <at> atai.org>

Date: Sat, 11 May 2024 19:11:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70883 in the body.
You can then email your comments to 70883 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#70883; Package guix-patches. (Sat, 11 May 2024 19:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andy Tai <atai <at> atai.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 11 May 2024 19:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andy Tai <atai <at> atai.org>
To: guix-patches <at> gnu.org
Cc: Andy Tai <atai <at> atai.org>
Subject: [PATCH] gnu: llama-cpp: Update to commit fed010.
Date: Sat, 11 May 2024 12:10:07 -0700
* gnu/packages/machine-learning.scm (llama-cpp): Update to commit fed010
  as last update was in February and new changes for new models and memory
  leaks fixes since then.
  [arguments]: <#:phases>: Add 'disable-unrunable-tests' phase.

Change-Id: Ia6532945f588747c4d58fdb7611d6a9c3c596705
---
 gnu/packages/machine-learning.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 7ff8c098b1..b737707a75 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -524,8 +524,8 @@ (define-public guile-aiscm-next
   (deprecated-package "guile-aiscm-next" guile-aiscm))
 
 (define-public llama-cpp
-  (let ((commit "03bf161eb6dea6400ee49c6dc6b69bdcfa9fd3fc")
-        (revision "1"))
+  (let ((commit "fed0108491a3a3cbec6c6480dc8667ffff9d7659")
+        (revision "2"))
     (package
       (name "llama-cpp")
       (version (git-version "0.0.0" revision commit))
@@ -537,7 +537,7 @@ (define-public llama-cpp
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "1ag1jash84hasz10h0piw72a8ginm8kzvhihbzzljz96gq2kjm88"))))
+          (base32 "16rm9gy0chd6k07crm8rkl2j3hg7y7h0km7k6c8q7bmm2jrd64la"))))
       (build-system cmake-build-system)
       (arguments
        (list
@@ -559,6 +559,15 @@ (define-public llama-cpp
                              (guix build python-build-system))
         #:phases
         #~(modify-phases %standard-phases
+            (add-after 'unpack 'disable-unrunable-tests
+               ; test-eval-callback downloads ML model from network, cannot run
+               ; in Guix build environment
+               (lambda _
+                   (substitute* '("examples/eval-callback/CMakeLists.txt")
+                       (("add_test") "#add_test"))
+                   (substitute* '("examples/eval-callback/CMakeLists.txt")
+                       (("set_property") "#set_property"))
+                   #t))
             (add-before 'install 'install-python-scripts
               (lambda _
                 (let ((bin (string-append #$output "/bin/")))

base-commit: 4eb1a5426b93bfd19282db0d255633ca2959efc5
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#70883; Package guix-patches. (Sat, 11 May 2024 22:09:02 GMT) Full text and rfc822 format available.

Message #8 received at 70883 <at> debbugs.gnu.org (full text, mbox):

From: Andy Tai <atai <at> atai.org>
To: 70883 <at> debbugs.gnu.org
Cc: Andy Tai <atai <at> atai.org>
Subject: [PATCH v2] gnu: llama-cpp: Update to commit fed010.
Date: Sat, 11 May 2024 15:07:20 -0700
* gnu/packages/machine-learning.scm (llama-cpp): Update to commit fed010
  as last update was in February and new changes for new models and memory
  leaks fixes since then.
  [arguments]: <#:phases>: Add 'disable-unrunable-tests' phase.
  Change replacement of 'install to be a post-install 'install-main'
  phase so libraries and header files are normally installed.

Change-Id: Ia6532945f588747c4d58fdb7611d6a9c3c596705
---
 gnu/packages/machine-learning.scm | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 7ff8c098b1..1a3716b912 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -524,8 +524,8 @@ (define-public guile-aiscm-next
   (deprecated-package "guile-aiscm-next" guile-aiscm))
 
 (define-public llama-cpp
-  (let ((commit "03bf161eb6dea6400ee49c6dc6b69bdcfa9fd3fc")
-        (revision "1"))
+  (let ((commit "fed0108491a3a3cbec6c6480dc8667ffff9d7659")
+        (revision "2"))
     (package
       (name "llama-cpp")
       (version (git-version "0.0.0" revision commit))
@@ -537,7 +537,7 @@ (define-public llama-cpp
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "1ag1jash84hasz10h0piw72a8ginm8kzvhihbzzljz96gq2kjm88"))))
+          (base32 "16rm9gy0chd6k07crm8rkl2j3hg7y7h0km7k6c8q7bmm2jrd64la"))))
       (build-system cmake-build-system)
       (arguments
        (list
@@ -559,6 +559,15 @@ (define-public llama-cpp
                              (guix build python-build-system))
         #:phases
         #~(modify-phases %standard-phases
+            (add-after 'unpack 'disable-unrunable-tests
+               ; test-eval-callback downloads ML model from network, cannot run
+               ; in Guix build environment
+               (lambda _
+                   (substitute* '("examples/eval-callback/CMakeLists.txt")
+                       (("add_test") "#add_test"))
+                   (substitute* '("examples/eval-callback/CMakeLists.txt")
+                       (("set_property") "#set_property"))
+                   #t))
             (add-before 'install 'install-python-scripts
               (lambda _
                 (let ((bin (string-append #$output "/bin/")))
@@ -581,7 +590,7 @@ (define-public llama-cpp
                   (make-script "convert"))))
             (add-after 'install-python-scripts 'wrap-python-scripts
               (assoc-ref python:%standard-phases 'wrap))
-            (replace 'install
+            (add-after 'install  'install-bin
               (lambda _
                 (copy-file "bin/main" (string-append #$output "/bin/llama")))))))
       (inputs (list python))

base-commit: 4eb1a5426b93bfd19282db0d255633ca2959efc5
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#70883; Package guix-patches. (Sun, 12 May 2024 00:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 70883 <at> debbugs.gnu.org (full text, mbox):

From: Andy Tai <atai <at> atai.org>
To: 70883 <at> debbugs.gnu.org
Cc: Andy Tai <atai <at> atai.org>
Subject: [PATCH v3] gnu: llama-cpp: Update to commit fed010.
Date: Sat, 11 May 2024 17:05:02 -0700
* gnu/packages/machine-learning.scm (llama-cpp): Update to commit fed010
  as last update was in February and new changes for new models and memory
  leaks fixes since then.
  [arguments]: <#:phases>: Add 'disable-unrunable-tests' phase.
  Change replacement of 'install to be a post-install 'install-main'
  phase so libraries and header files are normally installed.

Change-Id: Ia6532945f588747c4d58fdb7611d6a9c3c596705
---
 gnu/packages/machine-learning.scm | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 7ff8c098b1..53603e7133 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -524,8 +524,8 @@ (define-public guile-aiscm-next
   (deprecated-package "guile-aiscm-next" guile-aiscm))
 
 (define-public llama-cpp
-  (let ((commit "03bf161eb6dea6400ee49c6dc6b69bdcfa9fd3fc")
-        (revision "1"))
+  (let ((commit "fed0108491a3a3cbec6c6480dc8667ffff9d7659")
+        (revision "2"))
     (package
       (name "llama-cpp")
       (version (git-version "0.0.0" revision commit))
@@ -537,7 +537,7 @@ (define-public llama-cpp
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "1ag1jash84hasz10h0piw72a8ginm8kzvhihbzzljz96gq2kjm88"))))
+          (base32 "16rm9gy0chd6k07crm8rkl2j3hg7y7h0km7k6c8q7bmm2jrd64la"))))
       (build-system cmake-build-system)
       (arguments
        (list
@@ -559,6 +559,15 @@ (define-public llama-cpp
                              (guix build python-build-system))
         #:phases
         #~(modify-phases %standard-phases
+            (add-after 'unpack 'disable-unrunable-tests
+               ; test-eval-callback downloads ML model from network, cannot run
+               ; in Guix build environment
+               (lambda _
+                   (substitute* '("examples/eval-callback/CMakeLists.txt")
+                       (("add_test") "#add_test"))
+                   (substitute* '("examples/eval-callback/CMakeLists.txt")
+                       (("set_property") "#set_property"))
+                   #t))
             (add-before 'install 'install-python-scripts
               (lambda _
                 (let ((bin (string-append #$output "/bin/")))
@@ -581,7 +590,7 @@ (define-public llama-cpp
                   (make-script "convert"))))
             (add-after 'install-python-scripts 'wrap-python-scripts
               (assoc-ref python:%standard-phases 'wrap))
-            (replace 'install
+            (add-after 'install  'install-main
               (lambda _
                 (copy-file "bin/main" (string-append #$output "/bin/llama")))))))
       (inputs (list python))

base-commit: 4eb1a5426b93bfd19282db0d255633ca2959efc5
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#70883; Package guix-patches. (Sun, 12 May 2024 21:58:02 GMT) Full text and rfc822 format available.

Message #14 received at 70883 <at> debbugs.gnu.org (full text, mbox):

From: Andy Tai <atai <at> atai.org>
To: 70883 <at> debbugs.gnu.org
Date: Sun, 12 May 2024 14:55:58 -0700
patch passes Guix QA

https://qa.guix.gnu.org/issue/70883




Information forwarded to guix-patches <at> gnu.org:
bug#70883; Package guix-patches. (Mon, 13 May 2024 05:29:01 GMT) Full text and rfc822 format available.

Message #17 received at 70883 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: control <at> debbugs.gnu.org,70883 <at> debbugs.gnu.org
Subject: QA review for 70883
Date: Mon, 13 May 2024 07:28:07 +0200
user guix
usertag 70883 + reviewed-looks-good
thanks

Guix QA review form submission:

Hi Andy,

The trailing #t at the end of the 'disable-unrunable-tests phase is not
necessary, otherwise LGTM.

lint warns about possible upgrade but that's fine. 

Items marked as checked: Lint warnings, Package builds, Commit messages

-- 
Best regards,
Nicolas Graves




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Mon, 13 May 2024 08:32:02 GMT) Full text and rfc822 format available.

Notification sent to Andy Tai <atai <at> atai.org>:
bug acknowledged by developer. (Mon, 13 May 2024 08:32:02 GMT) Full text and rfc822 format available.

Message #22 received at 70883-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Andy Tai <atai <at> atai.org>
Cc: 70883-done <at> debbugs.gnu.org
Subject: Re: [bug#70883] [PATCH v3] gnu: llama-cpp: Update to commit fed010.
Date: Mon, 13 May 2024 09:31:35 +0100
[Message part 1 (text/plain, inline)]
Andy Tai <atai <at> atai.org> writes:

> * gnu/packages/machine-learning.scm (llama-cpp): Update to commit fed010
>   as last update was in February and new changes for new models and memory
>   leaks fixes since then.
>   [arguments]: <#:phases>: Add 'disable-unrunable-tests' phase.
>   Change replacement of 'install to be a post-install 'install-main'
>   phase so libraries and header files are normally installed.
>
> Change-Id: Ia6532945f588747c4d58fdb7611d6a9c3c596705
> ---
>  gnu/packages/machine-learning.scm | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
> index 7ff8c098b1..53603e7133 100644
> --- a/gnu/packages/machine-learning.scm
> +++ b/gnu/packages/machine-learning.scm
> @@ -524,8 +524,8 @@ (define-public guile-aiscm-next
>    (deprecated-package "guile-aiscm-next" guile-aiscm))
>  
>  (define-public llama-cpp
> -  (let ((commit "03bf161eb6dea6400ee49c6dc6b69bdcfa9fd3fc")
> -        (revision "1"))
> +  (let ((commit "fed0108491a3a3cbec6c6480dc8667ffff9d7659")
> +        (revision "2"))
>      (package
>        (name "llama-cpp")
>        (version (git-version "0.0.0" revision commit))
> @@ -537,7 +537,7 @@ (define-public llama-cpp
>                 (commit commit)))
>           (file-name (git-file-name name version))
>           (sha256
> -          (base32 "1ag1jash84hasz10h0piw72a8ginm8kzvhihbzzljz96gq2kjm88"))))
> +          (base32 "16rm9gy0chd6k07crm8rkl2j3hg7y7h0km7k6c8q7bmm2jrd64la"))))
>        (build-system cmake-build-system)
>        (arguments
>         (list
> @@ -559,6 +559,15 @@ (define-public llama-cpp
>                               (guix build python-build-system))
>          #:phases
>          #~(modify-phases %standard-phases
> +            (add-after 'unpack 'disable-unrunable-tests
> +               ; test-eval-callback downloads ML model from network, cannot run
> +               ; in Guix build environment
> +               (lambda _
> +                   (substitute* '("examples/eval-callback/CMakeLists.txt")
> +                       (("add_test") "#add_test"))
> +                   (substitute* '("examples/eval-callback/CMakeLists.txt")
> +                       (("set_property") "#set_property"))
> +                   #t))

Thanks, I've tweaked the commit message a bit, fixed the formatting for
this new phase and removed the #t at the end. I've pushed this to master
as 0b3f2f28c62ded05cacc6e278e5f7cf8a7d4ee1a.

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 10 Jun 2024 11:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.