Symforce

Latest version: v0.9.0

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.9.0

**Full Changelog**: https://github.com/symforce-org/symforce/compare/v0.8.0...v0.9.0

New in this release, we’ve added an experimental dense optimizer, greatly improved the [docs](https://symforce.org), and made some additions to the core symbolic API and codegen API. We also have lots of under-the-hood changes, to the optimizer and the build in particular. Keep reading for more details, and thanks to everyone who contributed!

:rotating_light: Breaking Changes

We're removing a few things that have been marked as deprecated for several releases now. We're also switching our C++ API to use references for mandatory input-output arguments, and deprecating the versions that used pointers, for consistency with our styleguide and modern best practices. And finally, we've removed the `early_exited` field from the `OptimizationStats` in favor of a more comprehensive description of exit status.

- 26838351 Remove deprecated stuff aaron-skydio
- b660c97b opt output-args by reference, not ptr bradley-solliday-skydio
- c3d2f3c9 Expose optimization status aaron-skydio

:brain: Optimizer Changes

SymForce now has a dense optimizer! This is designed for problems where the problem linearization is dense enough that it's better to perform a dense Cholesky decomposition rather than a sparse one. It's currently in an experimental state, you can find example usage [here](https://github.com/symforce-org/symforce/blob/84f76b601ea6575fb990a9c23f7b77611911eab7/test/symforce_dense_optimizer_test.cc).

As part of this, we've also made several changes to make it easier to swap out different parts of the optimizer like this.

Plus, we now expose more information about the result of an optimization beyond whether it just exited early - you can find that in `status` and `failure_reason` in the [`OptimizationStats`](https://symforce.org/api-cpp/file/optimization__stats_8h.html#_CPPv4N3sym17OptimizationStats6statusE).

- 1c6ad68b Add basic test of Dense optimizer bradley-solliday-skydio
- d30d1b29 CheckDerivatives gets any linearizer bradley-solliday-skydio
- bdc665b9 Be Sparse/Dense Linearizer agnostic bradley-solliday-skydio
- 9d0e3e16 Allow dense linearization in optimizer bradley-solliday-skydio
- fd747762 OptimizationStats Linearizat'n agnostic bradley-solliday-skydio
- 6501a459 Add DenseCholeskySolver bradley-solliday-skydio
- c3d2f3c9 Expose optimization status aaron-skydio
- ff17a89e Overload ComputeCovariance for MatrixX bradley-solliday-skydio
- d792e993 Add dense linearizer bradley-solliday-skydio
- 47b4ccc6 Factor out core of ComputeFactorHelper bradley-solliday-skydio
- f5356d89 Rename opt/cholesky opt/sparse_cholesky bradley-solliday-skydio
- caea9da5 add in compute_all_covariances to the py optimizer harrison-skydio
- f37a7836 Make LevenbergMarquardt Sparse agnostic bradley-solliday-skydio
- f8cad34b Add helpful err msg if unopt'zed factor bradley-solliday-skydio
- 6c3902d0 Template Linearization on sparsity bradley-solliday-skydio
- 7a34ec0c Rename linearization_sparse_key_helper bradley-solliday-skydio
- 0abeb62b Reduce of public Linearizer methods bradley-solliday-skydio
- 978ea345 Make optimization stats sparse agnostic bradley-solliday-skydio
- 4f701197 Move ComputeKeysToOptimize to factor.h bradley-solliday-skydio
- f03e353f Correct init residual order bradley-solliday-skydio
- 8fd8c1c2 Update doc-string to reflect signature bradley-solliday-skydio
- 59a03099 output_arg& UpdateXXXFactorIntoTriplets bradley-solliday-skydio
- 7eda4932 Add PreallocatedLinearizedDenseFactors bradley-solliday-skydio
- a0668084 Reduce of index lookups in linearizer bradley-solliday-skydio
- bdb848b4 Avoid second unordered_map lookup bradley-solliday-skydio
- f8743e78 rm index from LinearizedFactor types bradley-solliday-skydio
- d1b538c8 Add shape to sparsity pattern in stats aaron-skydio
- b660c97b opt output-args by reference, not ptr bradley-solliday-skydio
- 9266eb54 Add full stats to Python result object aaron-skydio
- 596e3bc4 Explicit instantiations for opt bradley-solliday-skydio
- e37758d7 Add missing pragma once bradley-solliday-skydio
- 52fc289e Declare explicit instantiation bradley-solliday-skydio

:books: Documentation Improvements

We've made multiple improvements to our docs for this release, both in readability and content. We have a new theme (with dark mode :sunglasses: ), and the API docs now have things formatted and cross-linked correctly. Check them out at https://symforce.org!

- 3aef619b Add note about numerical epsilon aaron-skydio
- c1d1ecb7 More docs aaron-skydio
- ee77f270 Fix returns in docstrings aaron-skydio
- 2dc5dda4 Clean up python sym docs aaron-skydio
- 43cdfff9 Switch docs theme to Furo aaron-skydio
- 12529d3a Clean up `opt` docs aaron-skydio
- 0e0fafc0 Partially clean up sym opt C++ docs aaron-skydio
- cce64be3 Fix links from generated to symbolic classes aaron-skydio
- caf55f42 Docs cleanup, take 2 aaron-skydio
- e75ffb09 Docs cleanup, take 1 aaron-skydio
- e8339037 Update cameras tutorial xipengwang
- 8ad6bab7 Added example code for initialization of sf.Rot3 using a quaternion VineetTambe
- fb0e6cb3 Fix docs for `Pose*.(retract|local_coordinates)` aaron-skydio
- dfa4d18f Add comment on sf.atan2 aaron-skydio
- 7269521e Reorder optimizer.py docstring aaron-skydio
- 40f129ce Clean up tangent_D_storage aaron-skydio

:pen: Codegen Improvements

We've made improvements and additions to codegen usage, and to the Python and PyTorch backends. In particular, we've added [`lambdify`](https://symforce.org/api/symforce.util.html#symforce.util.lambdify) and [`numbify`](https://symforce.org/api/symforce.util.html#symforce.util.numbify) functions, to easily convert symbolic functions to numerical ones for fast evaluation in Python. For example,

python
def foo(x: sf.Scalar, R: sf.Rot3) -> sf.Scalar:
return (R * sf.V3(x, 0, 0)).x

foo_numeric = symforce.util.lambdify(foo)

foo_numeric(5.0, sym.Rot3())


- 13872972 Broadcast tensors before stacking in pytorch backend zachary-teed-skydio
- 5c0d48d1 TemplateList.render supports specifying external search paths gareth-cross
- b7bc6992 Add update_template_data to CodegenConfig gareth-cross
- 03fc8be0 Add lambdify, numbify aaron-skydio
- 5a36e4c0 Use Codegen.name as python function name bradley-solliday-skydio
- d8056975 NumericFactor sets return_2d_vectors aaron-skydio
- 6adfbee0 Add `evict` option for `load_generated_function` aaron-skydio
- 68f39241 Generate Rot3.(from_angle_axis, from_two_unit_vectors) aaron-skydio

:symbols: Symbolic API Improvements

- 5bb0bddb Consolidate lists of types aaron-skydio
- c1b37fdc no more logmap_acos_clamp_max aaron-skydio
- c1fdca12 Check types of geo constructor arguments aaron-skydio
- d337809d Add `Matrix.det()` aaron-skydio

:gear: Buildsystem / Infra Changes

- df4f86c7 Print out fmt and spdlog version when finding packages chao-qu-skydio
- e64a1d8f Small fix to tl-optional handling in cmakelists chao-qu-skydio
- fe2a559d Fix symengine_wrapper search aaron-skydio
- ae2173a2 Clarify error on failed symengine import aaron-skydio
- f9c21ade Specify fmt version in find_package chao-qu-skydio
- d7a40fae Bump cmake_minimum_required version to 3.19 chao-qu-skydio
- 5bce25cc Upgrade requirements aaron-skydio
- c2283dbd Fix test include paths aaron-skydio
- 33f46d89 Packaging cleanup aaron-skydio
- 6c54bf5b Force pybind11 version asaba96
- c91bd036 Add max cmake policy version aaron-skydio
- db687f01 Remove unnecessary tl::optional alias aaron-skydio
- d56c10c7 Install symforce slam johhat
- 951884c9 Use URL for FetchContent aaron-skydio
- c7de4670 Fix symforce dependency of TartanLlama/optional arturo-skydio
- 8545df66 Upgrade dependencies aaron-skydio
- 30bd18e3 Drop bionic from CI aaron-skydio
- ee6ac287 build_wheels works on forks aaron-skydio
- 29b1ad11 Upgrade pylint aaron-skydio

:police_officer: SkyMarshal

- 7714ea70 [SkyMarshal] Print eigen_lcm types aaron-skydio
- fd6543b1 [SkyMarshal] Enums have getTypeNameArrayPtr aaron-skydio
- 61d70f03 skymarshal: only parse argfiles for the first argument william-smith-skydio
- ccb56201 [SkyMarshal] Make enums mypy-checkable aaron-skydio
- 5815fbd1 Add/fix some type annotations in skymarshal aaron-skydio


:sparkles: Misc

- 0940fa5b Fix new_symbol on py3.10+ aaron-skydio
- 2afcce34 Objects returned from generated functions are const aaron-skydio
- ace29ab9 More stuff includes-what-it-uses aaron-skydio
- 024818fb SYM_ASSERT takes messages aaron-skydio
- df0a8d2f Remove redundant virtual in GncOptimizer chao-qu-skydio
- b8821c9d A couple of random typos chao-qu-skydio
- 3cc60618 Replace empty ctor with =default in factor and values chao-qu-skydio
- 82d3a1ab Use range-based for instead of index-based chao-qu-skydio
- 07a53fd2 Finish removing os.path aaron-skydio
- 5be27bda Fix a shadowing declaration in PopulateIterationStats chao-qu-skydio
- 4539394c Add a SetNew method that throws if key already exists chao-qu-skydio
- 72c45e43 Use the _t variant instead of ::type chao-qu-skydio
- cfa72f1a Replace a couple of typedefs with using chao-qu-skydio
- 0f0c8023 Remove redundant static in an unnamed namespace chao-qu-skydio
- 7b221083 Add Unit3 to cc_sym aaron-skydio
- 35fd2d9d return size_t instead of int32_t from values::NumEntries() chao-qu-skydio

0.8.0

**Full Changelog**: https://github.com/symforce-org/symforce/compare/v0.7.0...v0.8.0

This is probably our biggest release yet, with multiple major additions - we have built-in IMU Preintegration, new backends for CUDA and PyTorch, and a new symbolic type for unit vectors on S(2). Plus, we've made major improvements to memory usage in the C++ optimizer, made lots of additions to the symbolic API, and made plenty of improvements under the hood.

:rotating_light: Breaking Changes
- ae434760 Slices of 1D matrices are matrices, not lists - taking a 1D slice of a `geo.Matrix` now returns a `geo.Matrix`, previously it would return a list.
- f60180e6 Add include_jacobians flag - by default, the `Optimizer` will now not allocate or populate the problem jacobian, since it is not needed for optimization. If you'd like it to be filled out, set `include_jacobians` to `true`.
- There are some simplifications to the `sym::Factor` API, described in `Code Cleanup / Refactoring` below. Most users should be unaffected.
- Generated Python functions return vectors as 1D ndarrays - see the description below

:chart_with_upwards_trend: IMU Factor
SymForce has IMU Preintegration! We have a C++ `ImuFactor` with preintegration and linearization functions generated from a symbolic implementation. See the PRs 279 and 280 for more information, and see [`imu_factor.h`](https://github.com/symforce-org/symforce/blob/main/symforce/slam/imu_preintegration/imu_factor.h) for an example.
- ab1c6211 Add an on manifold Imu Factor bradley-solliday-skydio

:mechanical_arm: CUDA Backend
The CUDA backend generates `__host__ __device__` functions, i.e. functions that you can call from within a CUDA kernel. It's currently in an experimental state, and supports scalars, vectors/matrices, and `sf.DataBuffer` in the APIs of generated functions; other types like `geo` and `cam` objects can be passed via their storage vectors. See the commit for more examples.
- 45b2ce2c CUDA Backend aaron-skydio

:fire: PyTorch Backend
The PyTorch backend generates python functions that operate on PyTorch tensors, with each symbolic op becoming one PyTorch op. It supports broadcasting these operations across multiple optional batch dimensions. Like the CUDA backend, this is currently experimental - it supports scalars and vectors/matrices in generated functions APIs, and is not particularly optimized for performance.
- a5341d81 PyTorch backend aaron-skydio
- 5835edf9 Better PyTorch test coverage aaron-skydio

:white_circle: geo.Unit3
The `Unit3` symbolic type lets you represent unit vectors in 3D, including optimizing unit vector variables and performing manifold operations on them.
- 6dadff98 Add geo.Unit3 to model directions in R^3 chao-qu-skydio

:arrow_right: Generated Python functions return vectors as 1D ndarrays
By default, generated python functions will now return 1d ndarrays for outputs that are row or column vectors (including 1x1 matrices). This includes member functions of generated python types, such as `sym.Pose3.position()`. See the commit for more information.
- 718d0614 return 1d vectors if !return_2d_vectors bradley-solliday-skydio

:dash: Optimizer Performance/API Improvements
Major improvements to memory usage in the C++ optimizer, especially for large problems like bundle adjustment that have lots of small factors. Also, converting a `sym::Values` to LCM is significantly faster.
- f60180e6 Add include_jacobians flag ryan-brott-skydio
- 5b756a65 Linearizer: stop storing dense linearized factors ryan-brott-skydio
- 1c1268a3 Turn off sort_by_offset for keys when get LCM message xipeng-wang-skydio
- c7b2715a Factor Jacobian factory functions are constructors aaron-skydio
- 8111eb28 Factor supports more functor types samuel-wang-skydio

:symbols: Symbolic API additions
- 892885bd Default to automatically picking output_names aaron-skydio
- ae434760 Slices of 1D matrices are matrices, not lists nathan-skydio
- 652bc74a Add `CSCFormat.to_matrix` nathan-skydio
- bd42ee96 Add metadata field to ResidualBlock nathan-skydio
- a9598269 Simplify geo_factors_codegen w/ skip_dir_nesting bradley-solliday-skydio
- fc4b4d5d More logic methods aaron-skydio
- 6ed28d93 Add V2.x,y and V3.x,y,z aaron-skydio
- 42b9694f Add sf.clamp aaron-skydio
- 9769ee34 Add unit_* shorthands to Matrix aaron-skydio
- 1c44a943 Pipe sparse_matrices through Codegen.function aaron-skydio
- 24eaf202 Add CodegenConfig.custom_preamble aaron-skydio
- a4d4bbc2 Check that namespaces are valid identifiers aaron-skydio
- 04acf8a9 Allow setting default epsilon to same value aaron-skydio
- f8f7eb46 Assert Matrix shape is correct when copying matrix bradley-solliday-skydio
- 23b1f84a Change default epsilon value to symbol bradley-solliday-skydio

:broom: Code Cleanup / Refactoring
- 6c3cc2d5 Cache factor indexes in the Linearizer aaron-skydio
- 9774673e Raise exception during codegen if name is not valid nathan-skydio
- 3e11ebd1 Check sparse matrix condition for Jacobian and Hessian constructors changh95
- 783ede7c Reduce the overload set of Factor constructors chao-qu-skydio
- af42fd81 DataBuffers not marked as unused aaron-skydio
- 305387d6 Reduce surface area of keys_to_func and keys_to_optimize chao-qu-skydio
- 1244d2ce Move Factor::IsSparse to the Helpers section chao-qu-skydio
- af2dff09 Optimizer asserts keys and factors are nonempty aaron-skydio
- 4a3fd727 Clear before reserve in OptimizationStats.Reset() chao-qu-skydio
- b2cceee3 Use the correct default epsilon in optimizer chao-qu-skydio
- 49018a4a Use operator bool of std::function to determine is_sparse chao-qu-skydio
- 91719064 Pass sink parameters by value and move chao-qu-skydio
- d3bb744b Change some usages of ScalarType to Scalar chao-qu-skydio
- 474f1bd5 Fix a linter error when a geo type does not define chao-qu-skydio
- 26dfa72b Matrix types cleanup aaron-skydio
- c835dbdc Reduce number of functor copies in factor creation chao-qu-skydio
- ecdeeef7 Make Key constexpr chao-qu-skydio
- da7b88d1 Include cstdint instead of stdint.h chao-qu-skydio

:gear: Infra / Buildsystem changes
- 9741edff Set min version of lazy-object-proxy to 1.9.0 bradley-solliday-skydio
- 0f4ca330 Fix symengine python_requires for setuptools 67 aaron-skydio
- 4c368815 Run tests once aaron-skydio
- 4a0e69b1 Update requirements aaron-skydio
- 2207030f requirements_test supports running from different locations aaron-skydio
- 1f53590f Add clang to CI, simplify matrix aaron-skydio
- a04ae351 symforce/test/*.py covered by pylint aaron-skydio
- 02e86d90 Use gcc 5.5 instead of 5.3 in CI aaron-skydio
- 791347a1 GitHub Actions Workflow Updates aaron-skydio

:police_officer: SkyMarshal
- 732ce358 Typescript updates vincent-lecrubier-skydio
- faeb8d18 All name functions are constexpr aaron-skydio
- 61846938 Remove unused variable aaron-skydio
- aaa593e5 Typescript changes rachel-skydio
- 6dc889a2 Add support for optional `UNKNOWN=0` alias for enums in LCM protobuf generation. karl-rosaen-skydio
- 78ad2292 Require python LCM arguments to construct using `from_all_fields` peter-skydio

0.7.0

**Full Changelog**: https://github.com/symforce-org/symforce/compare/v0.6.0...v0.7.0

:rotating_light: Breaking Changes
`sf.Pose2_SE2` and `sf.Pose3_SE3` are now in `geo.unsupported` (also accessible through `sf.unsupported`). We haven't removed any functionality, just moved them to clarify that they are not intended to be supported by much of SymForce and we do not intend to add more support for them. The `sf.Pose2` and `sf.Pose3` classes should be used instead, since they use more efficient representations.
- 1c1cfd10 Move SE(n) classes to geo.unsupported aaron-skydio

:snake: Python 3.11 Support
SymForce now supports Python 3.11! As of this release you should be able to build symforce from source or install it with `pip` on Python 3.11.

- 84f0fc71 Add py3.11 to list of supported versions aaron-skydio
- 0bc8ea66 Python 3.11 support aaron-skydio
- 443997a4 Update requirements aaron-skydio

:spiral_notepad: Documentation and Examples Improvements
- 68280302 Fix links and warnings in tutorials aaron-skydio
- 982ac127 Add internship callout, video link aaron-skydio
- c55badc9 Add note to README about epsilon aaron-skydio
- 6f100c51 Fix robot_2d_localization plotting aaron-skydio
- 5d816800 Add info on `make install` to README aaron-skydio
- fd644ff5 Create Values before Factors in examples aaron-skydio

:chart_with_downwards_trend: Optimizer Improvements
- e11c49f8 unique ID for Values and reset factor index_entries when input values changes samuel-wang-skydio
- da76e738 Count linearized factors then allocate aaron-skydio
- 22737378 Initialize default key contructor simutisernestas
- d9132d2c Expose jacobian and cholesky factor sparsity patterns aaron-skydio

:hammer_and_wrench: Buildsystem / Infrastructure / Testing Improvements
- b9795e1e Use checkoutv3 everywhere aaron-skydio
- 417f5662 Fix make test_update on macos bradley-solliday-skydio
- ec17afd1 stubs codegen test doesn't require the manifest aaron-skydio
- d2bb8a42 Add symforce_root and symforce_data_root aaron-skydio
- aaa78465 Move unused-import pylint ignore to one line aaron-skydio
- 352116fc Add workflow_dispatch trigger for CI aaron-skydio
- 3de6517c Remove unused interface library bradley-solliday-skydio
- 3571634a Update Catch2 to v3.1.1; Test on ubuntu jammy bradley-solliday-skydio
- af296202 Forward CMAKE_PREFIX_PATH to symengine brian-kubisiak-skydio
- 7ca1e438 Fix lcmtypes install during editable installation bradley-solliday-skydio
- cfa8e045 Editable install test fixes aaron-skydio

:police_officer: SkyMarshal
SkyMarshal C++ bindings can now serialize and deserialize messages larger than 2GiB

- 1552cbdb Use ptrdiff_t for encode/decode sizes aaron-skydio
- 95dd10b0 Misc typescript change vincent-lecrubier-skydio

:sparkles: Misc
- 694e2ca7 Add `_symengine_` attr to matrix class roy-vorster-skydio
- 96192292 Added assert to prevent codgen with nested databuffers nathan-skydio
- 5cf18404 Fix bug that caused symengine symbols types to be pass-by-ref roy-vorster-skydio
- d7220a07 More dataclasses over dicts aaron-skydio
- 6447174e Purge os.path aaron-skydio
- b16b2cb3 Add codegen_util.load_generated_function bradley-solliday-skydio
- 238765e9 Add interpolate lie group operation roy-vorster-skydio
- 3e543e8e Always raise IndexError if wrong shape genned code bradley-solliday-skydio
- 7d58556f Default log level is info aaron-skydio
- f0ef3289 sym class constructors accept column vectors bradley-solliday-skydio

0.6.0

History: [`v0.5.0...v0.6.0`](https://github.com/symforce-org/symforce/compare/v0.5.0...v0.6.0)

:symbols: Default Epsilon Configuration

Building on the tools from [v0.5](https://github.com/symforce-org/symforce/releases/tag/v0.5.0) for enabling configurable default epsilons for library functions, add checks to enable confidently generating code without worrying about forgetting to pass an epsilon somewhere, which would previously result in an unsafe generated function. Generating a function without calling `symforce.set_epsilon_to_symbol()` or `symforce.set_epsilon_to_number()` will produce a warning, since this allows unintentionally calling functions with singularities with an epsilon of 0. Similarly, setting epsilon to a symbol, but then attemptting to generate a function that doesn't take an argument for epsilon, will yield a descriptive error message. This behavior is also configurable through new additions to the [`CodegenConfig`](https://symforce.org/api/symforce.codegen.codegen_config.html#symforce.codegen.codegen_config.CodegenConfig). The error messages are intended to have thorough explanations, so let us know if they don't make sense by [creating an issue!](https://github.com/symforce-org/symforce/issues/new?assignees=&labels=bug&template=bug_report.md&title=)
- 559e521f Set the default epsilon to a symbol for codegen
- f17d8b20 Run python tests with ctest
- 713a00af Add sym.epsilon

:heavy_plus_sign: Call User-Defined Functions from Generated C++

The code generator supports replacing builtin functions with user-provided alternatives. For instance, a custom `my_lib::fast_sin` function can be replaced for `std::sin`. The [`CppConfig`](https://symforce.org/api/symforce.codegen.backends.cpp.cpp_config.html) has a new argument `override_methods` which can be used to specify these functions.

Shoutout to Roy Vorster for contributing this!

- 7f9cf250 Add function specific overwrites to sympy CPP printer

:factory: More methods on generated types

Add more methods to bring generated Python types up to parity with generated C++ types. In addition, automatically generate some previously handwritten methods.

- 48f69680 Codegen PoseX.position and rotation
- 90f14a01 Generate handwritten sym geo methods
- 81fa5025 Uniform position/rotation accessors
- 1e958632 Generate to_homogenous_matrix for pose types
- 8e2b19ca Codegen ToYawPitchRoll for C++ Rot3

:snake: Generated Python functions are more rigorous about Matrix shapes

[`PythonConfig`](https://symforce.org/api/symforce.codegen.backends.python.python_config.html#symforce.codegen.backends.python.python_config.PythonConfig) supports options for whether generated Python functions should expect all matrix inputs to be 2D arrays, or allow vectors to be 1D arrays. This fixes the previous unintuitive behavior of expecting storage arrays.

- c163cb61 Reshape matrix inputs to be rank 2
- 652eb97a Add matrix accessor format function to config and remove matrix_is_1d param

:wrench: CI/CD

Add a continuous testing suite on main and on pull requests across compilers and Python versions. In addition, add automatic deployment of the symforce docs to https://symforce.org.

- ff5a34b2 Rerun tests with output on failure
- 716befd8 Add docs as an artifact of CI runs
- 6dd9f9a8 Run CI on push to main and build badge
- d9633f32 Preserve downloads symforce-org.github.io
- de296a87 Auto-deploy docs on push to main
- 20548c31 Add SymForce CI

:broom: Code Quality Improvements

Various internal improvements, fixing C++ build warnings, sorting imports, and refactoring internal modules

- d10ac9a5 Sort imports with isort
- 6d1c918d Fix warnings
- 322faba3 Sort some imports
- b268447f Removed unused imports in symforce python function codegen template
- c3d0a255 Move things to typing_util
- 525f229f Misc changes to tests
- a7999d60 TemplateListEntry -> dataclass
- d154598a Modify optionality of template_dir arg
- 3f467fa9 Make TemplateList.add arg order match
- 429e6ac5 Take relative path in render_template

:police_officer: SkyMarshal
- 58e37ea3 [SkyMarshal] Sort imports
- a815051f [SkyMarshal] static functions in lcm_coretypes are `__attribute__((unused))`
- d2760d7d [SkyMarshal] Explicitly static_cast hashes to int64

:gift: Misc
- 693f2702 Clarify docstrings on SE(n) classes
- da612a98 Update installation instructions
- 8f01c0d9 Bump version to 0.6
- a948a315 Add failing test for factor cache with custom jacobians
- 9b3c47bf More factor cache fixes
- 48fd72d6 Use corrected runpaths w/ setup.py develop too
- 29310df2 dev_requirements.txt errors on py < 3.8
- d2181a84 Add note about building from a release
- 94d1bfab SparseCholesky is MPL2
- b3d6edb2 Fix of pip install -e . on both macos and ubuntu
- e97a5fda Upgrade to sympy 1.11
- 9a20a812 Fix factor cache
- 48699d1a Add more named Matrix types
- 47f4adbe Fix values_tutorial link
- 324bba21 LM Optimizer prints out id with iteration stats
- 40a6c9e0 Pull in the latest tl::optional
- b339396c Add numba to dev_requirements.txt
- e2ed9624 Symforce add sparse_linearization option to factor.py
- 7289ce0f Don't add symengine to sys.modules if import fails
- e131eae9 Use SYMFORCE_PYTHON for rerun_if_needed
- 75201b6e Fix build on cmake >=3.23
- d8e992f7 Fix broken links in README
- 71d36b08 Raise ValueError if subs args are different lengths
- 73d5dbe5 Symforce Values.from_storage allow different scalar types
- 73b22a5f Allow symforce storage ops to return numeric types
- d50dbba2 Fix docs for Group and LieGroup
- eeadcee9 Added getter function for symforce optimizer params
- cea8701d Move error message for wrong number of keys
- 367eeb85 Added helper function for converting Symforce Values to dicts
- 68384d0b Dataclass ops support T.Tuple
- 2d1a615e Codegen performance improvements
- e9ef4029 LinearCameraCal doesn't take Abs(z)
- 65f6d008 Use sf.sympy.Eq in symbolic_computation_speedups.ipynb
- 52d2b5d1 Regenerate with make test_update_all
- 87c031b5 Better errors from wrong factor results
- c0933d07 Fix type annotation
- f6496d68 Remove local Catch2 (instead fetch it)
- cdf8560e fix bug w/ lcm gen for large matrix
- d614535b Make cc_sym types pickleable

0.5.0

History: https://github.com/symforce-org/symforce/compare/v0.4.0...v0.5.0

:rotating_light: Symbolic API moved to `symforce.symbolic` :rotating_light:

The symbolic math components of SymForce are now unified under one import for ease of use:

python
import symforce.symbolic as sf


The `symforce.symbolic` module contains the SymForce-modified SymPy (or SymEngine) API, with our added logic functions and helper functions (i.e. things that were previously accessible from `symforce.sympy`), geometric lie group types (from `symforce.geo`), and camera types (from `symforce.cam`). If you just want the `geo` or `cam` types, those modules still exist and can be imported instead.

Usage of `symforce.sympy` is deprecated, you should use `symforce.symbolic` instead. It will be removed in a future release.

- 46dc58bf matrix.fixed_type_from_shape -> matrix_type_from_shape
- b34909bc Add deprecated symforce.sympy stub
- 5e0afd5f Add T.Scalar to sf
- a26a9d54 Add geo and cam to symforce.symbolic
- 192f5cf8 Move sympy api to symforce.symbolic

:symbols: Configurable default epsilons for library functions

SymForce now provides more flexibility around setting the default value of [epsilon](https://symforce.org/tutorials/epsilon_tutorial.html), its mechanism for handling singularity points.

Many library functions require an argument for `epsilon`, and previously defaulted it to 0 for ease of prototyping e.g. in a notebook. For runtime code, however, this can be a potential source of issues, since it can be easy to unintentionally forget to pass epsilon to one of these functions, meaning that an unhandled singularity creeps in. To address this, we have added a function `sf.epsilon()` which should be used as the default epsilon argument for library functions. The value that this returns is configurable - the default is 0 (so by default, behavior is the same). However, it can also be set to a symbol with `sf.set_epsilon_to_symbol()`, which is recommended for generating production code. Similarly, it can be set to a numerical value with `sf.set_epsilon_to_number()`. Either of these must be called before importing `symforce.symbolic`.

- f63171cc Fixed default epsilon
- 71339479 Use sm.epsilon() as default eps
- 8965840c sm.default_epsilon -> sm.numeric_epsiln

:gear: Unified mechanism for adding code generation backends

We've unified much of the backend-specific differences, so that it should be easier to add new code generation backends going forward. See [the PR](https://github.com/symforce-org/symforce/pull/158) and [the example of adding a JavaScript backend](https://github.com/symforce-org/symforce/pull/159) for more information.

- e4c2d19c Centralize code for creating new code generation backends

:police_officer: SkyMarshal Updates
- 90c48913 Enable skymarshal printing by default
- 5fb13f75 Allow unknown notations in skymarshal
- 06be0d83 [Skymarshal] Generate operator<< for all types

:hammer_and_wrench: Build System Fixes
- 2e14e4d1 Add minimum spdlog version
- fba4ae81 Workflow and build support for pip wheels
- 7f59396c Bump default pybind to 2.9.2
- ea82c15c Remove spdlog (and eigen and catch2) from the manifest
- 7efa7cd6 Misc docs, CMake, and packaging fixes
- 322c5642 Upgrade pip requirements
- c321ca01 Install eigen_lcm headers
- aba8ef79 Fix install paths

:gift: Misc other changes
- e7fea68f Fix spelling of word perturbation in lie-group docstrings
- 7c778ccd Use spdlog::set_level instead of sym::internal::SetLogLevel
- 411c8456 Retry symforce_docs_test 3 times on failure
- 3915767e Copy robot_2d_localization example
- 234f8275 Make robot_3d_localization comment true
- 41fbca04 Remove duplicate epsilon files
- 7bee06e7 Change format_py_dir to take T.Openable
- 5f4b9fc6 Emit a warning if optimizing factors that don't touch any keys
- 84a1ca2c Call modify_symbolic_api once per sympy
- cccb324a Fix up C++ example in README
- 43c2dfd9 Fix derivatives of sm.Mod
- 165b0974 Fix plotting code for robot_3d_localization example
- 9e08a786 fix factor_utils failing to compile on clang-6.0
- 60c9ccf6 Ret Path (!str) in generate_lcm_types
- bdd50e94 Enable sparse cc_sym.Factor creation

0.4.0

v0.4.0 is the first public release of SymForce outside the early-access program, and the first release after the [paper](https://arxiv.org/abs/2204.07889) was accepted to [RSS 2022](https://roboticsconference.org/). SymForce can now be pip installed on Linux and Mac with pre-built wheels.

History: https://github.com/symforce-org/symforce/compare/v0.3.0...v0.4.0

✨ Support for sparse matrices and factors in Python

Previously, SymForce could generate C++ functions of sparse matrices (in Eigen) and use them in the C++ optimizer, but it could not generate Python functions of sparse matrices or use Python optimizer. This release adds support for generating Python functions that use SciPy's sparse matrix format, and also the ability to convert them to Eigen in the pybind wrapper, so they can be used with the optimizer from Python.

- 77b8678 Add sym::Factor::SparseJacobianFunc
- 3ec069c Calculate hessian & rhs in one place
- eef1c9c Add sparse outputs to generate py code
- 3d8cd89 Expose symbolic jacobians computed by factor
- a43a296 Factor out py residual wrapper - cc_sym
- 2f91fb2 Make sparse_matrix_init more readable
- 357507e Replace Matrix arg with CSCFormat arg
- d2b1042 Remove None check in C++ sparse mat gen
- 4e2e586 More arguments passed through OptimizationProblem and Factor
- ff6cd01 get_sparse_mat_data to CSCFormat method
- 1fab87c Consistent Matrix storage order
- e2fbce0 CSCFormat type instead of dict

🧊 Data Buffers

Added initial support for data buffers, which are external arrays of data passed in to symbolic expressions, for example lookup tables, images, or volumetric maps. Code generation is currently supported, but not optimization.

- 2cd9dfe Initial work for values to support DataBuffer entries
- 236e27f don't allow DataBuffer to be iterable
- e0db744 Allow symengine to simplify DatabufferElement index expressions
- a550ed0 fix bug w/ databuffer storage ops
- 9f1345b databuffer tests
- 981d48a implement databuffer

⏱️ Code Generation

Many improvements to code generation quality and speed for large problems.

- 0c67bb8 Allow specific explicit template instantiations
- 0f03029 Give generate_function return type
- e7c1388 Convert matrix elements to float in to_numerical()
- 9a1069e Fix return type: str -> sm.Symbol
- ca55474 fix bug w/ symbol formatting in codegen_util
- 33184aa Remove unused codegen_util code
- aea7eb0 Rename output_terms to dense_terms
- 2862b26 Remove dead jinja code
- 7414072 Fixed codegen bug with dataclasses
- a626932 Allow explicit template instantiation for C++ codegen
- d094cda add an option to symengine wrapper to skip eval on _sympy_
- 04c6274 Changed codegen folder names from python2.7 to python
- 6aa7e0d add dont_flatten_args to _get_subs_dict
- c1d482d Disable code format when generating temp factors
- e654de2 move lazy imports outside for loop
- e76c6d6 Fix SymforceCodegenTest doc-string
- 015e968 Allow symforce to generate code from functions w/ dataclasses as args

👁️ Bundle Adjustment in the Large

Added an [example](https://github.com/symforce-org/symforce/blob/main/symforce/examples/bundle_adjustment_in_the_large/bundle_adjustment_in_the_large.cc) that optimizes the datasets from [Bundle Adjustment in the Large](https://grail.cs.washington.edu/projects/bal/) to parallel the [GTSAM](https://github.com/devbharat/gtsam/blob/master/examples/SFMExample_bal.cpp) and [Ceres](https://github.com/ceres-solver/ceres-solver/blob/master/examples/simple_bundle_adjuster.cc) examples. This is not yet a benchmark optimized for performance.

- bad1035 Bundle-Adjustment-in-the-Large Example

🥇 Optimization

Improve the optimization library based on testing larger multi-objective problems.

- 4540121 Fixed typo in optimizer
- 304654e Explicit template intantiate Optimizer
- af280a3 Added a type check on optimized values
- 34e6c17 fix bug w/ custom jacobians
- 46e8a0c Added some useful timestep objectives
- 2c926e8 Added support for loading factors from files

🛠️ Build System

Support `pip install symforce` with pre-built wheels, and upgrade dependencies.

- af687c1 Pin pip requirements
- 92c30f7 Support pip install [-e] .
- a3b2dc0 Bump skymarshal required cmake version to 3.19
- 24e9601 Split CMakeLists
- 3769c2d Upgrade sympy to version 1.10.1

✍🏼 Documentation

Improved the README, tutorials, and examples across the board to prepare for public release.

- ad2a796 Epsilon tutorial, rename ops tutorial
- 0bb830d Tweak README to prepare for public beta
- 0c2f9f2 Fix images in README
- d6eb5cc Add issue templates
- 91e0b18 Add arXiv link to README
- 94b1abd Add citation to repo, README
- bd26812 New Images
- d451552 Fix docs version and date
- 340c74d Regenerate after README and version updates
- 60042bb Update README.md
- 76e785e Update README.md
- a1da5b0 Minor README update
- 982f6d4 Update matrix multiplication benchmark

🎁 Miscellaneous

- 78d7844 [Skymarshal] lextab updates
- fb1bd27 Delete cholesky/assert
- f127562 Autoformat with clang-format 14
- 8591d8f Include cassert where we use it
- 185be31 Simplify ArrayStorageOps
- d32d14b Have ndarray ops use AbstractVectorOps
- 359bf11 [Skymarshal] Optional printing
- 5d52d76 Allow geo.M.__setitem__ with np.float64
- 97a47dc Assert geo.Matrix shape == arg shape
- 69ea6d6 Diffs in test failures
- cfc0b87 Remove hashable from sym.key_t.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.