trainingsample 0.3.2__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {trainingsample-0.3.2 → trainingsample-0.4.0}/.github/workflows/ci.yml +13 -13
  2. {trainingsample-0.3.2 → trainingsample-0.4.0}/.github/workflows/publish.yml +2 -2
  3. {trainingsample-0.3.2 → trainingsample-0.4.0}/.gitignore +1 -0
  4. {trainingsample-0.3.2 → trainingsample-0.4.0}/.pre-commit-config.yaml +4 -4
  5. {trainingsample-0.3.2 → trainingsample-0.4.0}/BENCHMARKS.md +6 -0
  6. {trainingsample-0.3.2 → trainingsample-0.4.0}/Cargo.lock +342 -309
  7. {trainingsample-0.3.2 → trainingsample-0.4.0}/Cargo.toml +17 -16
  8. {trainingsample-0.3.2 → trainingsample-0.4.0}/PKG-INFO +5 -5
  9. {trainingsample-0.3.2 → trainingsample-0.4.0}/README.md +1 -1
  10. {trainingsample-0.3.2 → trainingsample-0.4.0}/clippy.toml +0 -1
  11. {trainingsample-0.3.2 → trainingsample-0.4.0}/docs/BUILDING_STATIC_OPENCV.md +11 -0
  12. {trainingsample-0.3.2 → trainingsample-0.4.0}/pyproject.toml +8 -8
  13. {trainingsample-0.3.2 → trainingsample-0.4.0}/scripts/build-opencv-static.sh +15 -1
  14. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/lib.rs +3 -1
  15. {trainingsample-0.3.2 → trainingsample-0.4.0}/tests/test_performance_benchmarks.py +31 -23
  16. {trainingsample-0.3.2 → trainingsample-0.4.0}/.cargo/config.toml +0 -0
  17. {trainingsample-0.3.2 → trainingsample-0.4.0}/.envrc +0 -0
  18. {trainingsample-0.3.2 → trainingsample-0.4.0}/.rustfmt.toml +0 -0
  19. {trainingsample-0.3.2 → trainingsample-0.4.0}/Dockerfile +0 -0
  20. {trainingsample-0.3.2 → trainingsample-0.4.0}/LICENSE +0 -0
  21. {trainingsample-0.3.2 → trainingsample-0.4.0}/docs/API_COMPAT_CV2.md +0 -0
  22. {trainingsample-0.3.2 → trainingsample-0.4.0}/rust-toolchain.toml +0 -0
  23. {trainingsample-0.3.2 → trainingsample-0.4.0}/scripts/repair-wheel.sh +0 -0
  24. {trainingsample-0.3.2 → trainingsample-0.4.0}/scripts/run_competitive_benchmarks.sh +0 -0
  25. {trainingsample-0.3.2 → trainingsample-0.4.0}/setup-env.sh +0 -0
  26. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/core.rs +0 -0
  27. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/cropping.rs +0 -0
  28. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/cv_batch_ops.rs +0 -0
  29. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/cv_batch_ops_optimized.rs +0 -0
  30. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/cv_compat.rs +0 -0
  31. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/format_conversion_simd.rs +0 -0
  32. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/loading.rs +0 -0
  33. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/luminance.rs +0 -0
  34. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/luminance_simd.rs +0 -0
  35. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/opencv_ops.rs +0 -0
  36. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/python_bindings.rs +0 -0
  37. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/tests.rs +0 -0
  38. {trainingsample-0.3.2 → trainingsample-0.4.0}/src/true_batch_ops.rs +0 -0
  39. {trainingsample-0.3.2 → trainingsample-0.4.0}/tests/__init__.py +0 -0
  40. {trainingsample-0.3.2 → trainingsample-0.4.0}/tests/comprehensive_tests.rs +0 -0
  41. {trainingsample-0.3.2 → trainingsample-0.4.0}/tests/coverage_tests.rs +0 -0
  42. {trainingsample-0.3.2 → trainingsample-0.4.0}/tests/test_comprehensive.py +0 -0
  43. {trainingsample-0.3.2 → trainingsample-0.4.0}/tests/test_python_bindings.py +0 -0
@@ -13,7 +13,7 @@ env:
13
13
  jobs:
14
14
  rust-tests:
15
15
  name: Rust Tests
16
- runs-on: ubuntu-latest
16
+ runs-on: ubuntu-24.04
17
17
 
18
18
  steps:
19
19
  - uses: actions/checkout@v4
@@ -22,8 +22,8 @@ jobs:
22
22
  run: |
23
23
  sudo apt-get update
24
24
  sudo apt-get install -y pkg-config clang libclang-dev llvm-dev wget cmake build-essential
25
- # Install LLVM 18 which has the proper libclang.so symlink
26
- sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
25
+ # Install the matching development package for LLVM 18's libclang.so symlink
26
+ sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang-18-dev libclang1-18 libclang-cpp18
27
27
  # Set environment variables for LLVM 18
28
28
  echo "LIBCLANG_PATH=/usr/lib/llvm-18/lib" >> $GITHUB_ENV
29
29
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
@@ -105,7 +105,7 @@ jobs:
105
105
 
106
106
  python-tests:
107
107
  name: Python Tests
108
- runs-on: ubuntu-latest
108
+ runs-on: ubuntu-24.04
109
109
  strategy:
110
110
  matrix:
111
111
  python-version: ["3.11", "3.12", "3.13", "3.14"]
@@ -117,8 +117,8 @@ jobs:
117
117
  run: |
118
118
  sudo apt-get update
119
119
  sudo apt-get install -y pkg-config clang libclang-dev llvm-dev wget cmake build-essential
120
- # Install LLVM 18 which has the proper libclang.so symlink
121
- sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
120
+ # Install the matching development package for LLVM 18's libclang.so symlink
121
+ sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang-18-dev libclang1-18 libclang-cpp18
122
122
  # Set environment variables for LLVM 18
123
123
  echo "LIBCLANG_PATH=/usr/lib/llvm-18/lib" >> $GITHUB_ENV
124
124
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
@@ -199,7 +199,7 @@ jobs:
199
199
 
200
200
  pre-commit:
201
201
  name: Pre-commit hooks
202
- runs-on: ubuntu-latest
202
+ runs-on: ubuntu-24.04
203
203
 
204
204
  steps:
205
205
  - uses: actions/checkout@v4
@@ -208,8 +208,8 @@ jobs:
208
208
  run: |
209
209
  sudo apt-get update
210
210
  sudo apt-get install -y pkg-config clang libclang-dev llvm-dev wget cmake build-essential
211
- # Install LLVM 18 which has the proper libclang.so symlink
212
- sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
211
+ # Install the matching development package for LLVM 18's libclang.so symlink
212
+ sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang-18-dev libclang1-18 libclang-cpp18
213
213
  # Set environment variables for LLVM 18
214
214
  echo "LIBCLANG_PATH=/usr/lib/llvm-18/lib" >> $GITHUB_ENV
215
215
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
@@ -278,7 +278,7 @@ jobs:
278
278
  runs-on: ${{ matrix.os }}
279
279
  strategy:
280
280
  matrix:
281
- os: [ubuntu-latest, macos-latest]
281
+ os: [ubuntu-24.04, macos-latest]
282
282
 
283
283
  steps:
284
284
  - uses: actions/checkout@v4
@@ -288,8 +288,8 @@ jobs:
288
288
  run: |
289
289
  sudo apt-get update
290
290
  sudo apt-get install -y pkg-config clang libclang-dev llvm-dev wget cmake build-essential
291
- # Install LLVM 18 which has the proper libclang.so symlink
292
- sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
291
+ # Install the matching development package for LLVM 18's libclang.so symlink
292
+ sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang-18-dev libclang1-18 libclang-cpp18
293
293
  # Set environment variables for LLVM 18
294
294
  echo "LIBCLANG_PATH=/usr/lib/llvm-18/lib" >> $GITHUB_ENV
295
295
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
@@ -410,7 +410,7 @@ jobs:
410
410
  sudo apt-get update
411
411
  sudo apt-get install -y pkg-config clang libclang-dev llvm-dev wget cmake build-essential curl nasm yasm
412
412
 
413
- sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
413
+ sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang-18-dev libclang1-18 libclang-cpp18
414
414
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
415
415
 
416
416
  LIBCLANG_PATH="/usr/lib/llvm-18/lib"
@@ -76,7 +76,7 @@ jobs:
76
76
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-14" >> $GITHUB_ENV
77
77
  else
78
78
  # Ubuntu 24.04 has LLVM 18 by default
79
- sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
79
+ sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang-18-dev libclang1-18 libclang-cpp18
80
80
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
81
81
  fi
82
82
 
@@ -164,7 +164,7 @@ jobs:
164
164
  sudo apt-get install -y clang libclang-dev llvm-dev cmake curl wget nasm yasm pkg-config
165
165
 
166
166
  # Ubuntu 24.04 has LLVM 18 by default
167
- sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
167
+ sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang-18-dev libclang1-18 libclang-cpp18
168
168
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
169
169
 
170
170
  LIBCLANG_PATH="/usr/lib/llvm-18/lib"
@@ -52,6 +52,7 @@ Cargo.lock
52
52
  # Static OpenCV bundle (built in CI, not committed)
53
53
  third_party/
54
54
  opencv-build-tmp/
55
+ ffmpeg-build-tmp/
55
56
 
56
57
  files.tbz
57
58
  */config/auth.json
@@ -27,21 +27,21 @@ repos:
27
27
 
28
28
  # Python formatting and linting
29
29
  - repo: https://github.com/psf/black
30
- rev: 25.1.0
30
+ rev: 26.10.1
31
31
  hooks:
32
32
  - id: black
33
33
  language_version: python3
34
34
  files: \.py$
35
35
 
36
36
  - repo: https://github.com/pycqa/isort
37
- rev: 6.0.1
37
+ rev: 9.0.2
38
38
  hooks:
39
39
  - id: isort
40
40
  args: ["--profile", "black"]
41
41
  files: \.py$
42
42
 
43
43
  - repo: https://github.com/pycqa/flake8
44
- rev: 7.3.0
44
+ rev: 7.5.0
45
45
  hooks:
46
46
  - id: flake8
47
47
  args: ["--max-line-length=88", "--extend-ignore=E203,W503"]
@@ -49,7 +49,7 @@ repos:
49
49
 
50
50
  # TOML formatting
51
51
  - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
52
- rev: v2.15.0
52
+ rev: v2.16.0
53
53
  hooks:
54
54
  - id: pretty-format-toml
55
55
  args: [--autofix]
@@ -95,6 +95,12 @@ The performance file contains both benchmarks and assertions.
95
95
  Single-run `time.perf_counter` output is diagnostic. It is not a stable result
96
96
  across hosts or OpenCV builds.
97
97
 
98
+ The large-image luminance scaling check uses deterministic inputs and validates
99
+ results against NumPy. It compares medians from seven interleaved timing rounds,
100
+ with five calls per batch size in each round. Its CI guard allows up to twice
101
+ the per-image cost as batches grow; it does not require a parallel speedup on
102
+ shared runners or across CPU cache sizes.
103
+
98
104
  ## Published numbers
99
105
 
100
106
  This repository does not currently store benchmark artifacts keyed by commit,