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

[RTR] FIX: example which had an unexpected behavior, and a new that new implementation should pass #826

Merged
merged 12 commits into from
Mar 11, 2024

Conversation

Mart1t1
Copy link
Contributor

@Mart1t1 Mart1t1 commented Jan 19, 2024

Todo:


This change is Reviewable

@Ipuch
Copy link
Collaborator

Ipuch commented Jan 19, 2024

link to #825

@Ipuch Ipuch self-assigned this Jan 22, 2024
Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Ipuch and @Mart1t1)


tests/shard1/test_continuity_as_objective.py line 51 at r2 (raw file):

    #     [0.0, 0.0, 0.0, np.nan],
    # ]
    #

Values should be reinstated

Mart1t1 and others added 4 commits March 4, 2024 11:10
restoring doc, minimize_time as bool for tests, dividing weights of minimize time by the n_shooting, second pass converge @703 iterations
@Ipuch
Copy link
Collaborator

Ipuch commented Mar 4, 2024

  • restore minimize as objective test
  • removed "minimize time" for the test as not fundamentally necessary to test the feature
  • got convergence for first and second pass in test
  • the example as a different sample, I didn't get convergence in 500 iterations on first pass, but got around 700 in the second pass

@EveCharbie can you prereview the PR ?

@Ipuch Ipuch changed the title FIX: example which had an unexpected behavior, and a new that new implementation should pass [RTR] FIX: example which had an unexpected behavior, and a new that new implementation should pass Mar 4, 2024
Copy link
Collaborator

@EveCharbie EveCharbie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Ipuch

Reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @Ipuch, @Mart1t1, and @pariterre)


tests/shard1/test_continuity_as_objective.py line 126 at r4 (raw file):

        }
    ]
    expected_iterations = range(5, 35)  # 20 on my laptop @ipuch

I think this should be removed

Code quote:

expected_iterations = range(5, 35)  # 20 on my laptop @ipuch

tests/shard1/test_continuity_as_objective.py line 134 at r4 (raw file):

    np.testing.assert_almost_equal(sol_second_pass.vector, np.array([expected_vector]).T, decimal=4)
    np.testing.assert_almost_equal(sol_second_pass.constraints, np.array([expected_constraints]).T, decimal=4)
    np.testing.assert_almost_equal(float(sol_second_pass.cost), expected_cost, decimal=2)

The test seems to still be really sensitive :(
Do you think we should test it with less n_shooting or just make another example?

Code quote:

np.testing.assert_almost_equal(float(sol_second_pass.cost), expected_cost, decimal=2)

Copy link
Collaborator

@Ipuch Ipuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r1.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @EveCharbie and @pariterre)


tests/shard1/test_continuity_as_objective.py line 51 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

Values should be reinstated

Done


tests/shard1/test_continuity_as_objective.py line 126 at r4 (raw file):

Previously, EveCharbie (Eve Charbonneau) wrote…

I think this should be removed

I think this is good to know the number of iteration is not the same on CI and local computers, in case we have to debug.


tests/shard1/test_continuity_as_objective.py line 134 at r4 (raw file):

Previously, EveCharbie (Eve Charbonneau) wrote…

The test seems to still be really sensitive :(
Do you think we should test it with less n_shooting or just make another example?

Solved. I forgot, I increased the precision.

@Ipuch
Copy link
Collaborator

Ipuch commented Mar 4, 2024

Acados not working on MacOS CI. It Should be solved in another PR see #858

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 78.46%. Comparing base (944c2fe) to head (4856e37).
Report is 6 commits behind head on master.

Files Patch % Lines
...getting_started/example_continuity_as_objective.py 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #826      +/-   ##
==========================================
+ Coverage   78.25%   78.46%   +0.20%     
==========================================
  Files         140      140              
  Lines       16230    16245      +15     
==========================================
+ Hits        12701    12746      +45     
+ Misses       3529     3499      -30     
Flag Coverage Δ
unittests 78.46% <72.72%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 2 files at r5, 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @EveCharbie)

@pariterre pariterre merged commit c321b56 into pyomeca:master Mar 11, 2024
21 of 24 checks passed
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.

4 participants