Skip to content

Replace the backend with RoughPy and PyRecombine#136

Merged
inakleinbottle merged 27 commits intodevelopfrom
overhaul
Dec 17, 2024
Merged

Replace the backend with RoughPy and PyRecombine#136
inakleinbottle merged 27 commits intodevelopfrom
overhaul

Conversation

@inakleinbottle
Copy link
Contributor

Replaced the old compiled backend with RoughPy and PyRecombine.

inakleinbottle and others added 27 commits October 21, 2024 17:54
Deleted deprecated files related to old build configurations, headers, and auxiliary scripts. This cleanup ensures the repository contains only actively maintained and necessary files.
Abstract shared logic into helper methods to reduce redundancy in `compute_signature` and `compute_log_signature`. Handle single-sample edge cases with dedicated helper methods for empty signatures and log-signatures. Improve clarity and maintainability of backend computations.
Corrected the range computation for indices in `prepare_stream` to prevent off-by-one errors. Fixed swapped function calls for `sig_dim` and `log_sig_dim` in `empty_signature` and `empty_log_signature` to ensure proper array initialization.
Corrected the function name from `logsigAsTensor` to `Logsigastensor` in the `test_logsig` method. Ensures accurate usage and proper execution of the test case.
Added checks to verify that the input stream is a 2-dimensional array and that the depth does not exceed platform-specific limits. This improves input validation, prevents potential runtime errors, and enhances robustness of the stream-to-signature computations.
The resolution parameter in the signature method was unnecessary and has been removed to simplify the code. This change improves readability without affecting functionality.
The test now checks for a RuntimeError without matching a specific regex pattern. This simplifies the test and avoids potential issues or inconsistencies with pattern matching.
Remove unneeded resolution parameter in log signature call for clarity. Add leading spaces in key formatting to ensure consistency with expected output.
Replaced the use of `assertRaisesRegex` with `assertRaises` to directly test for `RuntimeError`. The regex check was commented out as it is unnecessary for this specific case.
@inakleinbottle inakleinbottle merged commit fde2d6e into develop Dec 17, 2024
2 checks passed
inakleinbottle added a commit that referenced this pull request Dec 17, 2024
* Fix numpy build dependency versioning (#109)

* Pinned Numpy version to 1.7.0 for build.

* Added only binary option for numpy dep

* Minimum version specified.

* no cached versions of Numpy for install

* Set more recent version of numpy

* oldest-supported-numpy

* Fixed variable in linux build script.

* Added build dependencies to setup.py

* Fixed installing wheel on mac and win

* Fixed issue on MacOS

* Fixed default range in switch_generator.py (#108)

* Fixed default range in switch_generator.py

* Update switch_generator.py

Limit to up to width 40 to test virtual machine memory limitation.

* Measures to reduce memory usage.

* Update build-wheel.sh

* Update linux_wheel_builder.sh

* Update linux_wheel_builder.sh

* Update build-wheel.sh

* Halved width range to reduce memory usage.

* Fixed error message for size functions. (#112)

* Update VERSION

* Update install_helpers.py

* Update install_helpers.py

* Update install_helpers.py

* Update mac_wheel_builder.sh

* Added CMakeLists.txt

* Improvements for performance

* Added support and tests for multithreading (#117)

* Added support and tests for multithreading

* Fixed import error in test file

Co-authored-by: Sam Morley <sam@inakleinbottle.com>

* New buildsystem (#121)

Updated the build system to use https://github.com/pypa/cibuildwheel for a more robust pipeline.

* Re-enable all configurations in switch

* Added deprecation warning to tosig module.

* delete switch.h, it is autogenerated now.

* Bump version and amend changelog

* Forgot to set version in setup.py

* Fixed description in setup.py

* Fix segfault transposed data (#125)

* Fixed description in setup.py

* Added test to check the functions work when provided with transposed data

* Refine construction of intermediate array.

* Revert to slow construction of vector

* Missed on real_stream

Co-authored-by: Sam Morley <sam@inakleinbottle.com>

* Version 0.9.8.1 - hotfix

* Updated CHANGELOG

* Append changelog to readme

* version up

* Fixed range of params (#128)

* Fixed range of params
* Fixed MANIFEST.in

* Update MANIFEST.in

* Update VERSION (#131)

* Update VERSION

* Update CHANGELOG

* bump submodules

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* Fixes and bump libalgebra

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* Fixes and bump libalgebra

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* Fixes and bump libalgebra

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* remove container

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* Bump libalgebra

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* link Boost::boost

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* use vcpkg?

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* bash bootstrap

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* fix name

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* set in setup.py

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* explicit vcpkg install

* oops, fixed vcpkg exe

* install deps

* install multiprecision

* bump libalgebra

* include boost type_traits ahead

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* Fixed the fresh hell that is the old tests

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* dependencies for windows, bumps

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* No 32bit linux. Nobody uses this

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* change macos runner

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* add llvm install for omp?

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* add env var for cmake prefix

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* last try, use install clang-omp

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* nope, apple is too stupid

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>

* Update esig.yml

* print for debug

* tighten up on search domain

* tighten up even more

* update github action workflow

* update action versions

* update another deprecated action

* guard against empty script

* update download urls for MKL on Windows

* fix bad check in macos script

* once more

* that wasn't right either

* Replace the backend with RoughPy and PyRecombine (#136)

* Remove legacy code and configuration files

Deleted deprecated files related to old build configurations, headers, and auxiliary scripts. This cleanup ensures the repository contains only actively maintained and necessary files.

* Move old workflows

* Add basic workflows file

* Adding hatch

* Reorder steps

* Delete old workflows, add hatch build

* Adding hatch run test

* Remove erroneous white spaces

* Try alternative test syntax

* Temporarily remove get_version

* Temporarily remove get_version and __version__

* Try to resolve with open VERSION errors

* Try to resolve with open VERSION errors again

* Comment open VERSION line

* Comment out NO_RECOMBINE calls, TestRecombine class

* Provide a LibalgebraBackend that is the RoughPyBackend

* copy the results as numpy arrays instead of returning the roughpy object

* fix a name in the tests

* Refactor and optimize signature computation methods.

Abstract shared logic into helper methods to reduce redundancy in `compute_signature` and `compute_log_signature`. Handle single-sample edge cases with dedicated helper methods for empty signatures and log-signatures. Improve clarity and maintainability of backend computations.

* Fix bugs in index calculation and signature dimension functions

Corrected the range computation for indices in `prepare_stream` to prevent off-by-one errors. Fixed swapped function calls for `sig_dim` and `log_sig_dim` in `empty_signature` and `empty_log_signature` to ensure proper array initialization.

* Fix typo in `logsig` test method function call

Corrected the function name from `logsigAsTensor` to `Logsigastensor` in the `test_logsig` method. Ensures accurate usage and proper execution of the test case.

* Ensure validation for stream dimensions and depth limits

Added checks to verify that the input stream is a 2-dimensional array and that the depth does not exceed platform-specific limits. This improves input validation, prevents potential runtime errors, and enhances robustness of the stream-to-signature computations.

* Remove redundant resolution parameter in signature call

The resolution parameter in the signature method was unnecessary and has been removed to simplify the code. This change improves readability without affecting functionality.

* Remove regex check in test_package_interface RuntimeError assertion

The test now checks for a RuntimeError without matching a specific regex pattern. This simplifies the test and avoids potential issues or inconsistencies with pattern matching.

* Fix log signature call and adjust key formatting output

Remove unneeded resolution parameter in log signature call for clarity. Add leading spaces in key formatting to ensure consistency with expected output.

* Simplify exception assertion in test for runtime errors.

Replaced the use of `assertRaisesRegex` with `assertRaises` to directly test for `RuntimeError`. The regex check was commented out as it is unnecessary for this specific case.

* Update esig_with_roughpy.yml

---------

Co-authored-by: Philippa Rubin <philipparubin@carneddau.cymru>

---------

Signed-off-by: inakleinbottle <admin@inakleinbottle.com>
Co-authored-by: Sam Morley <sam@inakleinbottle.com>
Co-authored-by: Philippa Rubin <philipparubin@carneddau.cymru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants