Repository navigation
Better type annotation for LieType.Mul method. - #383
Conversation
Summary of ChangesHello @MarkChenYutian, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the type annotations for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to improve type annotations for the LieType.Mul method by using @overload. While this is a good initiative for better static analysis, the current implementation of the overloads introduces an incorrect type hint for the case of multiplying a Lie Algebra by a Tensor. I've left a specific comment with a suggestion to correct this, ensuring the type hints are accurate for all cases.
…ian/pypose into MarkChenYutian/type-spec-fix
|
@wang-chen Hi I've fixed the problem mentioned by Gemini above by setting type of |
* Better type annotation for Mul method. * More specified type spec. --------- Co-authored-by: Chen Wang <chenw@sairlab.org>
* [politics] avoid inplace operations * [politics] avoid bmv in pcg * [misc] remove the auto registered csr mm * [optimizer] add the sparse interface * [ui] add weight unsupported warning * [pcg] minor bug when preconditioner is not supplied - fix the output format of cg * Raise explicit exception on optimizing w/ inference_mode. (#382) * Raise explicit exception on optimizing w/ inference_mode. * Minor fixes * Better type annotation for `LieType.Mul` method. (#383) * Better type annotation for Mul method. * More specified type spec. --------- Co-authored-by: Chen Wang <chenw@sairlab.org> * Bump version from 0.7.3 to 0.7.4 Signed-off-by: Chen Wang <chenw@sairlab.org> * Update setup.py for description and include python 3.12 and * update installation command for editable mode (#385) * Highlights - Installation Command Update: The editable installation command in README.md has been updated from the deprecated python setup.py develop to the modern pip install -e .. - Python Version Support: The setup.py file has been updated to declare support for Python versions 3.13 and 3.14, expanding compatibility for future environments. * Bump version to 0.7.5 Signed-off-by: Chen Wang <chenw@sairlab.org> * [test] clean up csr missing dispatch mess * [refactor] use the imported jacobian * add test case * dense and sparse live in the same step * the unsqueeze is no longer needed * add citation * [politics] simplify * add example * add ba example * remove the dynamic loading from bae * update sparse LM to PGO example * make pcg, TrackingTensor, and map_transform all pp api * [politics] use Track * [trim_SE3] update to simplified bae api * [politics] pp owner require simple example * simplify the example and remove `trim_SE3` from pp * change to sair-lab/bae * rename `parallel_for_sparse_jacobian` * [example] print loss per-iteration * update doc * [example] move bundle adjustment to ba * add version guard * [init] update the bae install command * remaining ba path change * remove doc redundant subsection title * annotate lietype in comment * change section title to autograd * autograd summery page * avoid residual --------- Signed-off-by: Chen Wang <chenw@sairlab.org> Co-authored-by: Yutian Chen <yutianch@andrew.cmu.edu> Co-authored-by: Chen Wang <chenw@sairlab.org>

Improved the type annotation for a better static analysis experience. Following the description of
pypose.mulmethod.