Unverified Commit da16fc63 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python312Packages.onnx: 1.16.2 -> 1.17.0 (#348985)

parents 8fece432 fe93fd33
Loading
Loading
Loading
Loading
+23 −46
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  cmake,
  fetchFromGitHub,

  # build-system
  cmake,
  pybind11,
  setuptools,

  # nativeBuildInputs
  protobuf-core,

  # buildInputs
  abseil-cpp,
  protobuf,
  gtest,
  nbval,

  # dependencies
  numpy,

  google-re2,
  nbval,
  parameterized,
  protobuf_21,
  pybind11,
  pillow,
  pytestCheckHook,
  pythonOlder,
  tabulate,
  typing-extensions,
  abseil-cpp,
  google-re2,
  pillow,
  protobuf,
  setuptools,
}:

let
@@ -29,8 +35,6 @@ buildPythonPackage rec {
  version = "1.17.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "onnx";
    repo = "onnx";
@@ -45,12 +49,11 @@ buildPythonPackage rec {
  ];

  nativeBuildInputs = [
    protobuf_21 # for protoc
    protobuf-core # `protoc` required
  ];

  buildInputs = [
    abseil-cpp
    protobuf_21
    gtestStatic
    pybind11
  ];
@@ -58,7 +61,6 @@ buildPythonPackage rec {
  dependencies = [
    protobuf
    numpy
    typing-extensions
  ];

  nativeCheckInputs = [
@@ -109,31 +111,6 @@ buildPythonPackage rec {
    "examples"
  ];

  disabledTests =
    [
      # attempts to fetch data from web
      "test_bvlc_alexnet_cpu"
      "test_densenet121_cpu"
      "test_inception_v1_cpu"
      "test_inception_v2_cpu"
      "test_resnet50_cpu"
      "test_shufflenet_cpu"
      "test_squeezenet_cpu"
      "test_vgg19_cpu"
      "test_zfnet512_cpu"
    ]
    ++ lib.optionals stdenv.hostPlatform.isAarch64 [
      # AssertionError: Output 0 of test 0 in folder
      "test__pytorch_converted_Conv2d_depthwise_padded"
      "test__pytorch_converted_Conv2d_dilated"
      "test_dft"
      "test_dft_axis"
      # AssertionError: Mismatch in test 'test_Conv2d_depthwise_padded'
      "test_xor_bcast4v4d"
      # AssertionError: assert 1 == 0
      "test_ops_tested"
    ];

  __darwinAllowLocalNetworking = true;

  postCheck = ''
@@ -143,11 +120,11 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "onnx" ];

  meta = with lib; {
    changelog = "https://github.com/onnx/onnx/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
  meta = {
    description = "Open Neural Network Exchange";
    homepage = "https://onnx.ai";
    license = licenses.asl20;
    maintainers = with maintainers; [ acairncross ];
    changelog = "https://github.com/onnx/onnx/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ acairncross ];
  };
}
+3 −1
Original line number Diff line number Diff line
@@ -9282,7 +9282,9 @@ self: super: with self; {
  onlykey-solo-python = callPackage ../development/python-modules/onlykey-solo-python { };
  onnx = callPackage ../development/python-modules/onnx { };
  onnx = callPackage ../development/python-modules/onnx {
    protobuf-core = pkgs.protobuf;
  };
  onnxconverter-common = callPackage ../development/python-modules/onnxconverter-common {
    inherit (pkgs) protobuf;