* [bug#65630] [PATCH] gnu: onnx: Update to 1.14.1
@ 2023-08-30 16:40 Andy Tai
2023-08-30 17:06 ` [bug#65630] [PATCH v2] " Andy Tai
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Andy Tai @ 2023-08-30 16:40 UTC (permalink / raw)
To: guix-patches, 65630; +Cc: Andy Tai
* gnu/packages/machine-learning.scm (onnx): Update to 1.14.1
* gnu/packages/patches/onnx-skip-model-downloads.patch: Adjust to onnx 1.14.1
* gnu/packages/patches/onnx-use-system-googletest.patch: Adjust to onnx 1.14.1
---
gnu/packages/machine-learning.scm | 8 +++++---
gnu/packages/patches/onnx-skip-model-downloads.patch | 8 ++++----
gnu/packages/patches/onnx-use-system-googletest.patch | 8 +++-----
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index ca7ca0ff09..267033ef56 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1025,7 +1025,7 @@ (define-public shogun
(define-public onnx
(package
(name "onnx")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1033,7 +1033,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "1g9f1hviksbn7gi6fnd0dsm7nf0w3yia0mjj33d9mggklrl0db6x"))
+ "1lg67z5kzky5qmfcll6dg9pkbdric4d2zwxs89ljc0nyla9rsm35"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-use-system-googletest.patch"
"onnx-shared-libraries.patch"
@@ -1059,7 +1059,9 @@ (define-public onnx
(string-append "-DCMAKE_INSTALL_RPATH=" out
"/lib")
"-DCMAKE_VERBOSE_MAKEFILE=ON"
-
+ "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" ; honor packagename_ROOT defines
+ (string-append "-DGTest_ROOT="
+ (assoc-ref %build-inputs "googletest"))
"-DBUILD_SHARED_LIBS=ON"))
;; This environment variable is honored by 'setup.py',
diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch
index 4ab55b4ceb..e96f4cb7d9 100644
--- a/gnu/packages/patches/onnx-skip-model-downloads.patch
+++ b/gnu/packages/patches/onnx-skip-model-downloads.patch
@@ -6,10 +6,10 @@ diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__i
index 049ed57b..f236f1bf 100644
--- a/onnx/backend/test/runner/__init__.py
+++ b/onnx/backend/test/runner/__init__.py
-@@ -202,6 +202,7 @@ class Runner(object):
- print('Start downloading model {} from {}'.format(
- model_test.model_name,
- model_test.url))
+@@ -227,6 +227,7 @@ class Runner(object):
+ print(
+ f"Start downloading model {model_test.model_name} from {model_test.url}"
+ )
+ raise unittest.SkipTest('Skipping download')
urlretrieve(model_test.url, download_file.name)
print('Done')
diff --git a/gnu/packages/patches/onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch
index 5dfcbc6dc3..4279ea37c6 100644
--- a/gnu/packages/patches/onnx-use-system-googletest.patch
+++ b/gnu/packages/patches/onnx-use-system-googletest.patch
@@ -28,21 +28,19 @@ index 0aa9fda2..a573170c 100644
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
+index e71b92a7..30c446ce 100644
--- a/cmake/unittest.cmake
+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
+@@ -7,7 +7,7 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
find_package(Threads)
-set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
list(APPEND ${UT_NAME}_libs onnx)
list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
+@@ -22,10 +22,10 @@ function(AddTest)
list(REMOVE_DUPLICATES _UT_SOURCES)
add_executable(${_UT_TARGET} ${_UT_SOURCES})
base-commit: 74d72046bdc1ed6c859565570d0db58d20c9ddd7
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH v2] gnu: onnx: Update to 1.14.1
2023-08-30 16:40 [bug#65630] [PATCH] gnu: onnx: Update to 1.14.1 Andy Tai
@ 2023-08-30 17:06 ` Andy Tai
2023-09-03 3:44 ` [bug#65630] [PATCH v2 1/2] gnu: python-protobuf: Update to 3.20.3 Andy Tai
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Andy Tai @ 2023-08-30 17:06 UTC (permalink / raw)
To: 65630; +Cc: Andy Tai
* gnu/packages/machine-learning.scm (onnx): Update to 1.14.1
* gnu/packages/patches/onnx-skip-model-downloads.patch: Adjust to onnx 1.14.1
* gnu/packages/patches/onnx-use-system-googletest.patch: Adjust to onnx 1.14.1
---
gnu/packages/machine-learning.scm | 9 ++++++---
gnu/packages/patches/onnx-skip-model-downloads.patch | 8 ++++----
gnu/packages/patches/onnx-use-system-googletest.patch | 8 +++-----
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index ca7ca0ff09..626afeb030 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1025,7 +1025,7 @@ (define-public shogun
(define-public onnx
(package
(name "onnx")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1033,7 +1033,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "1g9f1hviksbn7gi6fnd0dsm7nf0w3yia0mjj33d9mggklrl0db6x"))
+ "1lg67z5kzky5qmfcll6dg9pkbdric4d2zwxs89ljc0nyla9rsm35"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-use-system-googletest.patch"
"onnx-shared-libraries.patch"
@@ -1059,7 +1059,10 @@ (define-public onnx
(string-append "-DCMAKE_INSTALL_RPATH=" out
"/lib")
"-DCMAKE_VERBOSE_MAKEFILE=ON"
-
+ "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW"
+ ; honor packagename_ROOT defines
+ (string-append "-DGTest_ROOT="
+ (assoc-ref %build-inputs "googletest"))
"-DBUILD_SHARED_LIBS=ON"))
;; This environment variable is honored by 'setup.py',
diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch
index 4ab55b4ceb..e96f4cb7d9 100644
--- a/gnu/packages/patches/onnx-skip-model-downloads.patch
+++ b/gnu/packages/patches/onnx-skip-model-downloads.patch
@@ -6,10 +6,10 @@ diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__i
index 049ed57b..f236f1bf 100644
--- a/onnx/backend/test/runner/__init__.py
+++ b/onnx/backend/test/runner/__init__.py
-@@ -202,6 +202,7 @@ class Runner(object):
- print('Start downloading model {} from {}'.format(
- model_test.model_name,
- model_test.url))
+@@ -227,6 +227,7 @@ class Runner(object):
+ print(
+ f"Start downloading model {model_test.model_name} from {model_test.url}"
+ )
+ raise unittest.SkipTest('Skipping download')
urlretrieve(model_test.url, download_file.name)
print('Done')
diff --git a/gnu/packages/patches/onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch
index 5dfcbc6dc3..4279ea37c6 100644
--- a/gnu/packages/patches/onnx-use-system-googletest.patch
+++ b/gnu/packages/patches/onnx-use-system-googletest.patch
@@ -28,21 +28,19 @@ index 0aa9fda2..a573170c 100644
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
+index e71b92a7..30c446ce 100644
--- a/cmake/unittest.cmake
+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
+@@ -7,7 +7,7 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
find_package(Threads)
-set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
list(APPEND ${UT_NAME}_libs onnx)
list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
+@@ -22,10 +22,10 @@ function(AddTest)
list(REMOVE_DUPLICATES _UT_SOURCES)
add_executable(${_UT_TARGET} ${_UT_SOURCES})
base-commit: 74d72046bdc1ed6c859565570d0db58d20c9ddd7
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH v2 1/2] gnu: python-protobuf: Update to 3.20.3
2023-08-30 16:40 [bug#65630] [PATCH] gnu: onnx: Update to 1.14.1 Andy Tai
2023-08-30 17:06 ` [bug#65630] [PATCH v2] " Andy Tai
@ 2023-09-03 3:44 ` Andy Tai
2023-09-03 3:44 ` [bug#65630] [PATCH v2 2/2] gnu: onnx: Update to 1.14.1 Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 1/4] gnu: python-protobuf: Update to 3.20.3 Andy Tai
2024-01-04 17:11 ` [bug#65630] Sharlatan Hellseher
3 siblings, 1 reply; 11+ messages in thread
From: Andy Tai @ 2023-09-03 3:44 UTC (permalink / raw)
To: 65630; +Cc: Andy Tai
* gnu/packages/protobuf.scm (python-protobuf): Update to 3.20.3
---
gnu/packages/protobuf.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index 8cd805799e..dc3ba72ee1 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -425,14 +425,14 @@ (define-public python-nanopb
(define-public python-protobuf
(package
(name "python-protobuf")
- (version "3.20.1")
+ (version "3.20.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "protobuf" version))
(sha256
(base32
- "1ja2vpk9nklllmsirmil2s4l7ni9yfqvbvj47zz5xx17s1k1bhxd"))))
+ "1wh5f4rnzbv46xy1rx62cprhg5hqf2py06s9b7rfpzwwki12fd1f"))))
(build-system python-build-system)
(inputs (list protobuf))
(arguments
base-commit: 4818ad5ba204e094fd8995c90c16ee1940e76210
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH v2 2/2] gnu: onnx: Update to 1.14.1
2023-09-03 3:44 ` [bug#65630] [PATCH v2 1/2] gnu: python-protobuf: Update to 3.20.3 Andy Tai
@ 2023-09-03 3:44 ` Andy Tai
2023-09-09 13:42 ` [bug#65630] [PATCH] " Ludovic Courtès
0 siblings, 1 reply; 11+ messages in thread
From: Andy Tai @ 2023-09-03 3:44 UTC (permalink / raw)
To: 65630; +Cc: Andy Tai
* gnu/packages/machine-learning.scm (onnx): Update to 1.14.1
* gnu/packages/patches/onnx-skip-model-downloads.patch: Adjust to onnx 1.14.1
* gnu/packages/patches/onnx-use-system-googletest.patch: Adjust to onnx 1.14.1
---
gnu/packages/machine-learning.scm | 12 ++++++++----
gnu/packages/patches/onnx-skip-model-downloads.patch | 8 ++++----
.../patches/onnx-use-system-googletest.patch | 8 +++-----
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 53778114eb..d8d99addd1 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1025,7 +1025,7 @@ (define-public shogun
(define-public onnx
(package
(name "onnx")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1033,7 +1033,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "1g9f1hviksbn7gi6fnd0dsm7nf0w3yia0mjj33d9mggklrl0db6x"))
+ "1lg67z5kzky5qmfcll6dg9pkbdric4d2zwxs89ljc0nyla9rsm35"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-use-system-googletest.patch"
"onnx-shared-libraries.patch"
@@ -1059,7 +1059,9 @@ (define-public onnx
(string-append "-DCMAKE_INSTALL_RPATH=" out
"/lib")
"-DCMAKE_VERBOSE_MAKEFILE=ON"
-
+ "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
+ "-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
+ ; force system copy use;
"-DBUILD_SHARED_LIBS=ON"))
;; This environment variable is honored by 'setup.py',
@@ -1090,10 +1092,12 @@ (define-public onnx
pybind11
python-coverage
python-nbval
+ python-parameterized
+ python-protobuf
python-pytest
python-pytest-runner))
(inputs
- (list protobuf))
+ (list protobuf ))
(propagated-inputs
(list python-numpy python-protobuf python-six python-tabulate
python-typing-extensions))
diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch
index 4ab55b4ceb..e96f4cb7d9 100644
--- a/gnu/packages/patches/onnx-skip-model-downloads.patch
+++ b/gnu/packages/patches/onnx-skip-model-downloads.patch
@@ -6,10 +6,10 @@ diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__i
index 049ed57b..f236f1bf 100644
--- a/onnx/backend/test/runner/__init__.py
+++ b/onnx/backend/test/runner/__init__.py
-@@ -202,6 +202,7 @@ class Runner(object):
- print('Start downloading model {} from {}'.format(
- model_test.model_name,
- model_test.url))
+@@ -227,6 +227,7 @@ class Runner(object):
+ print(
+ f"Start downloading model {model_test.model_name} from {model_test.url}"
+ )
+ raise unittest.SkipTest('Skipping download')
urlretrieve(model_test.url, download_file.name)
print('Done')
diff --git a/gnu/packages/patches/onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch
index 5dfcbc6dc3..4279ea37c6 100644
--- a/gnu/packages/patches/onnx-use-system-googletest.patch
+++ b/gnu/packages/patches/onnx-use-system-googletest.patch
@@ -28,21 +28,19 @@ index 0aa9fda2..a573170c 100644
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
+index e71b92a7..30c446ce 100644
--- a/cmake/unittest.cmake
+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
+@@ -7,7 +7,7 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
find_package(Threads)
-set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
list(APPEND ${UT_NAME}_libs onnx)
list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
+@@ -22,10 +22,10 @@ function(AddTest)
list(REMOVE_DUPLICATES _UT_SOURCES)
add_executable(${_UT_TARGET} ${_UT_SOURCES})
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH] gnu: onnx: Update to 1.14.1
2023-09-03 3:44 ` [bug#65630] [PATCH v2 2/2] gnu: onnx: Update to 1.14.1 Andy Tai
@ 2023-09-09 13:42 ` Ludovic Courtès
2023-09-09 17:53 ` Andy Tai
0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2023-09-09 13:42 UTC (permalink / raw)
To: Andy Tai; +Cc: 65630
Hi Andy,
This apparently causes 30 failures on x86_64-linux:
https://qa.guix.gnu.org/issue/65630
Could you take a look?
TIA,
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH] gnu: onnx: Update to 1.14.1
2023-09-09 13:42 ` [bug#65630] [PATCH] " Ludovic Courtès
@ 2023-09-09 17:53 ` Andy Tai
0 siblings, 0 replies; 11+ messages in thread
From: Andy Tai @ 2023-09-09 17:53 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 65630
Sure.
On Sat, Sep 9, 2023 at 6:42 AM Ludovic Courtès <ludo@gnu.org> wrote:
>
> Hi Andy,
>
> This apparently causes 30 failures on x86_64-linux:
>
> https://qa.guix.gnu.org/issue/65630
>
> Could you take a look?
>
> TIA,
> Ludo’.
--
Andy Tai, atai@atai.org, Skype: licheng.tai, Line: andy_tai, WeChat: andytai1010
Year 2023 民國112年
自動的精神力是信仰與覺悟
自動的行為力是勞動與技能
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH v3 1/4] gnu: python-protobuf: Update to 3.20.3
2023-08-30 16:40 [bug#65630] [PATCH] gnu: onnx: Update to 1.14.1 Andy Tai
2023-08-30 17:06 ` [bug#65630] [PATCH v2] " Andy Tai
2023-09-03 3:44 ` [bug#65630] [PATCH v2 1/2] gnu: python-protobuf: Update to 3.20.3 Andy Tai
@ 2023-09-10 20:01 ` Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 2/4] gnu: onnx: Update to 1.14.1 Andy Tai
` (2 more replies)
2024-01-04 17:11 ` [bug#65630] Sharlatan Hellseher
3 siblings, 3 replies; 11+ messages in thread
From: Andy Tai @ 2023-09-10 20:01 UTC (permalink / raw)
To: 65630; +Cc: Andy Tai
* gnu/packages/protobuf.scm (python-protobuf): Update to 3.20.3
---
gnu/packages/protobuf.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index 8cd805799e..dc3ba72ee1 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -425,14 +425,14 @@ (define-public python-nanopb
(define-public python-protobuf
(package
(name "python-protobuf")
- (version "3.20.1")
+ (version "3.20.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "protobuf" version))
(sha256
(base32
- "1ja2vpk9nklllmsirmil2s4l7ni9yfqvbvj47zz5xx17s1k1bhxd"))))
+ "1wh5f4rnzbv46xy1rx62cprhg5hqf2py06s9b7rfpzwwki12fd1f"))))
(build-system python-build-system)
(inputs (list protobuf))
(arguments
base-commit: 5db78e7c1b06d1b4892bdb3e153b95b21577271e
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH v3 2/4] gnu: onnx: Update to 1.14.1
2023-09-10 20:01 ` [bug#65630] [PATCH v3 1/4] gnu: python-protobuf: Update to 3.20.3 Andy Tai
@ 2023-09-10 20:01 ` Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 3/4] gnu: onnx: Use G-Expressions Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 4/4] gnu: onnx-optimizer: Update to 0.3.17 Andy Tai
2 siblings, 0 replies; 11+ messages in thread
From: Andy Tai @ 2023-09-10 20:01 UTC (permalink / raw)
To: 65630; +Cc: Andy Tai
* gnu/packages/machine-learning.scm (onnx): Update to 1.14.1
* gnu/packages/patches/onnx-skip-model-downloads.patch: Adjust to onnx 1.14.1
* gnu/packages/patches/onnx-use-system-googletest.patch: Adjust to onnx 1.14.1
---
gnu/packages/machine-learning.scm | 12 ++++++++----
gnu/packages/patches/onnx-skip-model-downloads.patch | 8 ++++----
.../patches/onnx-use-system-googletest.patch | 8 +++-----
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index fd0be8d500..c1f5925b11 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1061,7 +1061,7 @@ (define-public shogun
(define-public onnx
(package
(name "onnx")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1069,7 +1069,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "1g9f1hviksbn7gi6fnd0dsm7nf0w3yia0mjj33d9mggklrl0db6x"))
+ "1lg67z5kzky5qmfcll6dg9pkbdric4d2zwxs89ljc0nyla9rsm35"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-use-system-googletest.patch"
"onnx-shared-libraries.patch"
@@ -1095,7 +1095,9 @@ (define-public onnx
(string-append "-DCMAKE_INSTALL_RPATH=" out
"/lib")
"-DCMAKE_VERBOSE_MAKEFILE=ON"
-
+ "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
+ "-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
+ ; force system copy use;
"-DBUILD_SHARED_LIBS=ON"))
;; This environment variable is honored by 'setup.py',
@@ -1126,10 +1128,12 @@ (define-public onnx
pybind11
python-coverage
python-nbval
+ python-parameterized
+ python-protobuf
python-pytest
python-pytest-runner))
(inputs
- (list protobuf))
+ (list protobuf ))
(propagated-inputs
(list python-numpy python-protobuf python-six python-tabulate
python-typing-extensions))
diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch
index 4ab55b4ceb..e96f4cb7d9 100644
--- a/gnu/packages/patches/onnx-skip-model-downloads.patch
+++ b/gnu/packages/patches/onnx-skip-model-downloads.patch
@@ -6,10 +6,10 @@ diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__i
index 049ed57b..f236f1bf 100644
--- a/onnx/backend/test/runner/__init__.py
+++ b/onnx/backend/test/runner/__init__.py
-@@ -202,6 +202,7 @@ class Runner(object):
- print('Start downloading model {} from {}'.format(
- model_test.model_name,
- model_test.url))
+@@ -227,6 +227,7 @@ class Runner(object):
+ print(
+ f"Start downloading model {model_test.model_name} from {model_test.url}"
+ )
+ raise unittest.SkipTest('Skipping download')
urlretrieve(model_test.url, download_file.name)
print('Done')
diff --git a/gnu/packages/patches/onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch
index 5dfcbc6dc3..4279ea37c6 100644
--- a/gnu/packages/patches/onnx-use-system-googletest.patch
+++ b/gnu/packages/patches/onnx-use-system-googletest.patch
@@ -28,21 +28,19 @@ index 0aa9fda2..a573170c 100644
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
+index e71b92a7..30c446ce 100644
--- a/cmake/unittest.cmake
+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
+@@ -7,7 +7,7 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
find_package(Threads)
-set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
list(APPEND ${UT_NAME}_libs onnx)
list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
+@@ -22,10 +22,10 @@ function(AddTest)
list(REMOVE_DUPLICATES _UT_SOURCES)
add_executable(${_UT_TARGET} ${_UT_SOURCES})
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH v3 3/4] gnu: onnx: Use G-Expressions.
2023-09-10 20:01 ` [bug#65630] [PATCH v3 1/4] gnu: python-protobuf: Update to 3.20.3 Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 2/4] gnu: onnx: Update to 1.14.1 Andy Tai
@ 2023-09-10 20:01 ` Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 4/4] gnu: onnx-optimizer: Update to 0.3.17 Andy Tai
2 siblings, 0 replies; 11+ messages in thread
From: Andy Tai @ 2023-09-10 20:01 UTC (permalink / raw)
To: 65630; +Cc: Andy Tai
* gnu/packages/machine-learning.scm (onnx)[arguments]: Convert to list of G-Expressions.
---
gnu/packages/machine-learning.scm | 88 ++++++++++++++++---------------
1 file changed, 45 insertions(+), 43 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index c1f5925b11..3c26eb4e64 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1078,50 +1078,52 @@ (define-public onnx
(snippet '(delete-file-recursively "third_party"))))
(build-system python-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (add-before 'build 'pass-cmake-arguments
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Pass options to the CMake-based build process.
- (define out
- (assoc-ref outputs "out"))
-
- (define args
- ;; Copy arguments from 'cmake-build-system', plus ask
- ;; for shared libraries.
- (list "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
- (string-append "-DCMAKE_INSTALL_PREFIX=" out)
- "-DCMAKE_INSTALL_LIBDIR=lib"
- "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
- (string-append "-DCMAKE_INSTALL_RPATH=" out
- "/lib")
- "-DCMAKE_VERBOSE_MAKEFILE=ON"
- "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
- "-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
+ (list #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'pass-cmake-arguments
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Pass options to the CMake-based build process.
+ (define out
+ (assoc-ref outputs "out"))
+
+ (define args
+ ;; Copy arguments from 'cmake-build-system', plus ask
+ ;; for shared libraries.
+ (list "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+ (string-append "-DCMAKE_INSTALL_PREFIX=" out)
+ "-DCMAKE_INSTALL_LIBDIR=lib"
+ "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
+ (string-append "-DCMAKE_INSTALL_RPATH=" out
+ "/lib")
+ "-DCMAKE_VERBOSE_MAKEFILE=ON"
+ "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
+ "-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
; force system copy use;
- "-DBUILD_SHARED_LIBS=ON"))
-
- ;; This environment variable is honored by 'setup.py',
- ;; which passes it down to 'cmake'.
- (setenv "CMAKE_ARGS" (string-join args))
-
- ;; This one is honored by 'setup.py' and passed to 'make
- ;; -j'.
- (setenv "MAX_JOBS"
- (number->string (parallel-job-count)))))
- (add-before 'check 'make-test-directory-writable
- (lambda _
- ;; Make things writable for tests.
- (setenv "HOME" (getcwd))
- (for-each make-file-writable
- (find-files "onnx/examples" "."
- #:directories? #t))))
- (add-after 'install 'install-from-cmake
- (lambda _
- ;; Run "make install" in the build tree 'setup.py'
- ;; created for CMake so that libonnx.so,
- ;; libonnx_proto.so, etc. are installed.
- (invoke "make" "install"
- "-C" ".setuptools-cmake-build"))))))
+ "-DBUILD_SHARED_LIBS=ON"))
+
+ ;; This environment variable is honored by 'setup.py',
+ ;; which passes it down to 'cmake'.
+ (setenv "CMAKE_ARGS"
+ (string-join args))
+
+ ;; This one is honored by 'setup.py' and passed to 'make
+ ;; -j'.
+ (setenv "MAX_JOBS"
+ (number->string (parallel-job-count)))))
+ (add-before 'check 'make-test-directory-writable
+ (lambda _
+ ;; Make things writable for tests.
+ (setenv "HOME"
+ (getcwd))
+ (for-each make-file-writable
+ (find-files "onnx/examples" "."
+ #:directories? #t))))
+ (add-after 'install 'install-from-cmake
+ (lambda _
+ ;; Run "make install" in the build tree 'setup.py'
+ ;; created for CMake so that libonnx.so,
+ ;; libonnx_proto.so, etc. are installed.
+ (invoke "make" "install" "-C"
+ ".setuptools-cmake-build"))))))
(native-inputs
(list cmake
googletest
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#65630] [PATCH v3 4/4] gnu: onnx-optimizer: Update to 0.3.17
2023-09-10 20:01 ` [bug#65630] [PATCH v3 1/4] gnu: python-protobuf: Update to 3.20.3 Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 2/4] gnu: onnx: Update to 1.14.1 Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 3/4] gnu: onnx: Use G-Expressions Andy Tai
@ 2023-09-10 20:01 ` Andy Tai
2 siblings, 0 replies; 11+ messages in thread
From: Andy Tai @ 2023-09-10 20:01 UTC (permalink / raw)
To: 65630; +Cc: Andy Tai
* gnu/packages/machine-learning.scm (onnx-optimizer): Update to 0.3.17
* gnu/packages/patches/onnx-optimizer-system-library.patch:
Adapt to onnx-optimizer 0.3.17
---
gnu/packages/machine-learning.scm | 12 +++--
.../onnx-optimizer-system-library.patch | 48 +++++++++++--------
2 files changed, 36 insertions(+), 24 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 3c26eb4e64..dfba9f666a 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1098,8 +1098,10 @@ (define-public onnx
"-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
"-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
; force system copy use;
- "-DBUILD_SHARED_LIBS=ON"))
-
+ "-DBUILD_SHARED_LIBS=ON"
+ (string-append "-DONNX_ROOT="
+ #$(package-source this-package))))
+ ;; for derived package use
;; This environment variable is honored by 'setup.py',
;; which passes it down to 'cmake'.
(setenv "CMAKE_ARGS"
@@ -1157,8 +1159,8 @@ (define-public python-onnx
(define-public onnx-optimizer
(package
(name "onnx-optimizer")
- ;; Note: 0.2.x is *more* recent than 1.5.0.
- (version "0.2.6")
+ ;; Note: 0.2.x or 0.3.x is *more* recent than 1.5.0.
+ (version "0.3.17")
(home-page "https://github.com/onnx/optimizer")
(source (origin
(method git-fetch)
@@ -1167,7 +1169,7 @@ (define-public onnx-optimizer
(commit (string-append "v" version))))
(sha256
(base32
- "1wkqqdxcxpfbf8zpbdfdd3zz5jkw775g31gyykj11z4y6pp659l6"))
+ "0j8civ0vf2vxyk5ihb9zxvwsqv8yzbfmkg42rnxwf59gdzgz48li"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-optimizer-system-library.patch"))
(modules '((guix build utils)))
diff --git a/gnu/packages/patches/onnx-optimizer-system-library.patch b/gnu/packages/patches/onnx-optimizer-system-library.patch
index 5c592597e0..7890bee045 100644
--- a/gnu/packages/patches/onnx-optimizer-system-library.patch
+++ b/gnu/packages/patches/onnx-optimizer-system-library.patch
@@ -1,42 +1,42 @@
-Arrange so that onnx-optimizer (1) uses our own ONNX build,
+Arrange so that onnx-optimizer (1) uses our own ONNX build,
(2) builds as a shared library, and (3) links against the shared
libraries of ONNX.
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c2e48b35..8af51076 100644
+index 00633856..c6f3188d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -9,8 +9,6 @@ endif(NOT MSVC)
-
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-
+@@ -27,8 +27,6 @@ if(NOT ONNX_OPT_USE_SYSTEM_PROTOBUF)
+ endif()
+
+
-set(ONNX_ROOT ${PROJECT_SOURCE_DIR}/third_party/onnx)
--add_subdirectory(${ONNX_ROOT})
-
+-add_subdirectory_if_no_target(${ONNX_ROOT} ${ONNX_TARGET_NAME})
+
file(READ "${PROJECT_SOURCE_DIR}/VERSION_NUMBER" ONNX_OPTIMIZER_VERSION)
string(STRIP "${ONNX_OPTIMIZER_VERSION}" ONNX_OPTIMIZER_VERSION)
-@@ -21,14 +19,18 @@ file(GLOB_RECURSE onnx_opt_srcs "onnxoptimizer/*.cc"
+@@ -41,14 +39,18 @@ file(GLOB onnx_opt_srcs "onnxoptimizer/*.cc"
list(REMOVE_ITEM onnx_opt_srcs "${PROJECT_SOURCE_DIR}/onnxoptimizer/cpp2py_export.cc")
- add_library(onnx_optimizer ${onnx_opt_srcs})
--target_link_libraries(onnx_optimizer PUBLIC onnx)
-+target_link_libraries(onnx_optimizer PUBLIC onnx onnx_proto)
+ onnxopt_add_library(onnx_optimizer ${onnx_opt_srcs})
+-target_link_libraries(onnx_optimizer PUBLIC ${ONNX_TARGET_NAME})
++target_link_libraries(onnx_optimizer PUBLIC ${ONNX_TARGET_NAME} onnx_proto)
target_include_directories(onnx_optimizer PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
-
+
+# These cpp macros must be defined so the ONNX headers behave
+# correctly.
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DONNX_ML=1 -DONNX_NAMESPACE=onnx")
+
- add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp)
+ onnxopt_add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp)
-target_link_libraries(onnx_optimizer_exec onnx_optimizer)
+target_link_libraries(onnx_optimizer_exec onnx_optimizer protobuf)
-
- if(BUILD_ONNX_PYTHON)
- if("${PY_EXT_SUFFIX}" STREQUAL "")
-@@ -79,11 +81,10 @@ if(BUILD_ONNX_PYTHON)
+
+
+ file(GLOB onnx_opt_c_api_srcs "onnxoptimizer/c_api/*.cc"
+@@ -112,11 +114,10 @@ if(BUILD_ONNX_PYTHON)
PRIVATE $<TARGET_OBJECTS:onnx_optimizer>)
else()
# Assume everything else is like gcc
@@ -49,5 +49,15 @@ index c2e48b35..8af51076 100644
+ PROPERTIES LINK_FLAGS
+ "-Wl,-rpath=${CMAKE_INSTALL_PREFIX}/lib")
endif()
-
+
target_link_libraries(onnx_opt_cpp2py_export PRIVATE onnx_optimizer)
+diff --git a/cmake/utils.cmake b/cmake/utils.cmake
+index 6cca9f36..8e39d5c4 100644
+--- a/cmake/utils.cmake
++++ b/cmake/utils.cmake
+@@ -1,4 +1,4 @@
+-include(${PROJECT_SOURCE_DIR}/third_party/onnx/cmake/Utils.cmake)
++include(${ONNX_ROOT}/cmake/Utils.cmake)
+
+ # Poor man's FetchContent
+ function(add_subdirectory_if_no_target dir target)
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#65630]
2023-08-30 16:40 [bug#65630] [PATCH] gnu: onnx: Update to 1.14.1 Andy Tai
` (2 preceding siblings ...)
2023-09-10 20:01 ` [bug#65630] [PATCH v3 1/4] gnu: python-protobuf: Update to 3.20.3 Andy Tai
@ 2024-01-04 17:11 ` Sharlatan Hellseher
3 siblings, 0 replies; 11+ messages in thread
From: Sharlatan Hellseher @ 2024-01-04 17:11 UTC (permalink / raw)
To: 65630
Hi,
name: onnx
version: 1.12.0
Is broken on commit:
guix describe
Generation 498 Jan 04 2024 10:55:58 (current)
guix 7b0863f
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 7b0863f07a113caef26fea13909bd97d250b629e
phase `make-test-directory-writable' succeeded after 0.0 seconds
starting phase `check'
running "python setup.py" with command "test" and parameters ()
running pytest
/gnu/store/91wasjkmy50p8fq0rf9jby80mnmq1fxr-python-3.10.7/lib/python3.10/site-packages/setuptools/command/easy_install.py:144:
EasyInstallDeprecationWarning: easy_install command is deprecated. Use
build and pip and other standards-based tools.
warnings.warn(
/gnu/store/91wasjkmy50p8fq0rf9jby80mnmq1fxr-python-3.10.7/lib/python3.10/site-packages/setuptools/command/install.py:34:
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use
build and pip and other standards-based tools.
warnings.warn(
Searching for protobuf<=3.20.1,>=3.12.2
Reading https://pypi.org/simple/protobuf/
Download error on https://pypi.org/simple/protobuf/: [Errno -3]
Temporary failure in name resolution -- Some packages may not be
found!
Couldn't find index page for 'protobuf' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: [Errno -3] Temporary
failure in name resolution -- Some packages may not be found!
No local packages or working download links found for protobuf<=3.20.1,>=3.12.2
It would be nice to have it fixed with this update.
Thanks,
Oleg
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-01-04 14:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-30 16:40 [bug#65630] [PATCH] gnu: onnx: Update to 1.14.1 Andy Tai
2023-08-30 17:06 ` [bug#65630] [PATCH v2] " Andy Tai
2023-09-03 3:44 ` [bug#65630] [PATCH v2 1/2] gnu: python-protobuf: Update to 3.20.3 Andy Tai
2023-09-03 3:44 ` [bug#65630] [PATCH v2 2/2] gnu: onnx: Update to 1.14.1 Andy Tai
2023-09-09 13:42 ` [bug#65630] [PATCH] " Ludovic Courtès
2023-09-09 17:53 ` Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 1/4] gnu: python-protobuf: Update to 3.20.3 Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 2/4] gnu: onnx: Update to 1.14.1 Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 3/4] gnu: onnx: Use G-Expressions Andy Tai
2023-09-10 20:01 ` [bug#65630] [PATCH v3 4/4] gnu: onnx-optimizer: Update to 0.3.17 Andy Tai
2024-01-04 17:11 ` [bug#65630] Sharlatan Hellseher
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.