Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing lifters #2

Open
yaqding opened this issue Dec 21, 2024 · 5 comments
Open

Missing lifters #2

yaqding opened this issue Dec 21, 2024 · 5 comments

Comments

@yaqding
Copy link

yaqding commented Dec 21, 2024

Hi,

I was trying to test _scripts/ess_mat_clearn.py and _scripts/fund_mat_clearn.py, but got errors with from lifters.state_lifter import StateLifter.
I also tried _test/test_essmat.py
============================================================ ERRORS =============================================================
_____________________________________________ ERROR collecting _test/test_essmat.py _____________________________________________
_test/test_essmat.py:103: in init
self.layer = EssentialSDPBlock(tol=tol, K_source=K_batch, K_target=K_batch)
src/sdprlayers/layers/essential_est.py:87: in init
self.homQCQP.clique_decomposition()
../anaconda3/envs/pytorch3d/lib/python3.9/site-packages/cert_tools/hom_qcqp.py:163: in clique_decomposition
self.get_asg()
../anaconda3/envs/pytorch3d/lib/python3.9/site-packages/cert_tools/hom_qcqp.py:96: in get_asg
pmat = self.C.copy()
E AttributeError: 'tuple' object has no attribute 'copy'

Best

@holmesco
Copy link
Collaborator

holmesco commented Jan 7, 2025

Hi! The essential (and fundamental) matrix parts of the repo are still under construction. Hopefully they will be ready to use in the next couple of weeks.

@yaqding
Copy link
Author

yaqding commented Jan 18, 2025

Unsuccessful installation

pytest _test/test_sdpr_poly6.py gives the following info

FAILED _test/test_sdpr_poly6.py::test_run_sdp - AssertionError: FAILED _test/test_sdpr_poly6.py::test_prob_sdp - AssertionError: ValueError('Terminated on max iterations') FAILED _test/test_sdpr_poly6.py::test_grad_qcqp_constraints - TypeError: 'NoneType' object is not subscriptable ======================================================================== 3 failed, 4 passed, 497 warnings in 4.89s

pytest _test/test_stereo_tune.py gives the following info
FAILED _test/test_stereo_tune.py::TestStereoTune::test_compare_grads - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_forward_mosek - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_forward_scs - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_forward_theseus - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_grads_camera - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_grads_data_mat - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_grads_optlayer_mosek - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_grads_optlayer_scs - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_grads_theseus - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data' FAILED _test/test_stereo_tune.py::TestStereoTune::test_tune_params_no_opt - AttributeError: module 'sdprlayers.utils.stereo_tuner' has no attribute 'get_stereo_prob_data'

There are also some import errors:

from sdprlayer import SDPRLayer
should be from sdprlayers.layers.sdprlayer import SDPRLayer
from sdprlayer import stereo_tuner as st
should be from sdprlayers.utils import stereo_tuner as st

Removing homogenous:
Previous version
https://github.com/utiasASRL/sdprlayer/blob/6f4c9dbbc9cd351dbd1a783ba37f72ae934c4cdd/src/sdprlayers/layers/sdprlayer.py#L430C5-L433C17
In the recent update, it seems that the first entry '1' is keept, resulting in incorrect plot in 'tighten_example.ipynb'
-- '# Note that the homogenizing variable is stripped away x_star = x[0,0]'

x = (X[0:, [0]] + X[[0], 0:].T) / 2.0

Could you check and fix the issues?

Best/

@holmesco
Copy link
Collaborator

Merged a branch with fixes to these issues. Note that only some of the tests files are functioning. Others are deprecated but will be removed later. See the README for tests that should be passing.

Also moved repo dependencies to submodules, so the setup should be more streamlined.

Let me know if you have any other issues.

@yaqding
Copy link
Author

yaqding commented Jan 21, 2025

Merged a branch with fixes to these issues. Note that only some of the tests files are functioning. Others are deprecated but will be removed later. See the README for tests that should be passing.

Also moved repo dependencies to submodules, so the setup should be more streamlined.

Let me know if you have any other issues.

Thanks! It works well. The only issue is in the 'tighten_example.ipynb'
# Note that the homogenizing variable is stripped away
x_star = x[0,0]
where 'x_star = x[1]' works for me.

Best/

@holmesco
Copy link
Collaborator

fixed in last pull request. Also fixed essential matrix estimation layer.

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

No branches or pull requests

2 participants