[PATCH] gnu: llama-cpp: Update to commit fed010.

  • Done
  • quality assurance status badge
Details
3 participants
  • Andy Tai
  • Christopher Baines
  • Nicolas Graves
Owner
unassigned
Submitted by
Andy Tai
Severity
normal
A
A
Andy Tai wrote on 11 May 21:10 +0200
(address . guix-patches@gnu.org)(name . Andy Tai)(address . atai@atai.org)
7c2a1ab89edc065ae01fa817955ec92b8f49b575.1715454561.git.atai@atai.org
* 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(-)

Toggle diff (44 lines)
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
A
A
Andy Tai wrote on 12 May 00:07 +0200
[PATCH v2] gnu: llama-cpp: Update to commit fed010.
(address . 70883@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
35146a33b9193b5f66dab0c4c83e65bb36219ff2.1715465193.git.atai@atai.org
* 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(-)

Toggle diff (53 lines)
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
A
A
Andy Tai wrote on 12 May 02:05 +0200
[PATCH v3] gnu: llama-cpp: Update to commit fed010.
(address . 70883@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
b6fb60c643008c1ae9fd99e18561e7d9742ba9f3.1715472290.git.atai@atai.org
* 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(-)

Toggle diff (53 lines)
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
A
N
N
Nicolas Graves wrote on 13 May 07:28 +0200
87msoucmc8.fsf@ngraves.fr
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
C
C
Christopher Baines wrote on 13 May 10:31 +0200
Re: [bug#70883] [PATCH v3] gnu: llama-cpp: Update to commit fed010.
(name . Andy Tai)(address . atai@atai.org)(address . 70883-done@debbugs.gnu.org)
87zfsu3yfs.fsf@cbaines.net
Andy Tai <atai@atai.org> writes:

Toggle quote (50 lines)
> * 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
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmZBz+dfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xdyow//fXJV+6lbAw1xgkz6zRJxqTxhd7zp1uYk
vOMa1Gh07DqgqLh9uMbapYewclwc0uOgjYX3ru0ohU2brFRzL2b5qJQ3rfGD4hw+
Ac6lDslhDGj3icv6/bVeS0nm15uOXCQkRdRuvOW5hWBhCu7jPz6q8OospY36j5Aj
GUTbhfcXydCgak3jspvZAeLwcZpvJJwbETCKHA7OHlEAq0MXKx9gC4Y5YvtKnS7M
cC7cMWxcLFi24fzA/bQ5ZPOI4HXQKHd/gbWR7N+Wr6GZGDNHGTqWpBLW53exfok6
8fFEAHwKN716V0JMbQKCplYNgUQG0B5ojsIODuHvsjT513bwxhIklSIngQZiZ1dc
zkAx2D3t9uzcS2p0xlvE7tNyszxOw5lMZdFVc3IFRnMLOaKdfN2NcFtnWLg1o6m+
+bORoikpuUAVr/b0MTBuXX1SEiU61W9c+KLOgAECmX5Jm+rJVN9FR8IYOmX6mrUA
+pNNZMe5Wm9i6h57kYlu1goruFoYioKhzGJzI3iXrTkE63B6YbAkXQwrA63iR07x
8POTWsxBYAxzFQY95c9zZytbvSbDt+qgIQM4iApHSv41lvOQ154UhrKccsZtYw3O
lkHqDWCunWZpYYKFJAH8tATjmrFw5hfAQRxgCsQHCdv9wbA9NfIuwo3iDbze5Y4y
fRSN2kte08Y=
=aBfk
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70883@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70883
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch