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

Cleanup pypesto/profile/profile_next_guess.py #1167

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Oct 31, 2023

Some cleanup / simplification of pypesto/profile/profile_next_guess.py

Some cleanup / simplification of pypesto/profile/profile_next_guess.py
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2023

Codecov Report

Merging #1167 (ba129d4) into develop (160c2a8) will decrease coverage by 3.78%.
Report is 408 commits behind head on develop.
The diff coverage is 87.87%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@             Coverage Diff             @@
##           develop    #1167      +/-   ##
===========================================
- Coverage    88.16%   84.39%   -3.78%     
===========================================
  Files           79      148      +69     
  Lines         5257    11667    +6410     
===========================================
+ Hits          4635     9846    +5211     
- Misses         622     1821    +1199     
Files Coverage Δ
pypesto/C.py 100.00% <100.00%> (ø)
pypesto/__init__.py 100.00% <100.00%> (ø)
pypesto/engine/__init__.py 100.00% <100.00%> (ø)
pypesto/engine/multi_process.py 93.10% <100.00%> (+0.79%) ⬆️
pypesto/engine/multi_thread.py 100.00% <100.00%> (ø)
pypesto/engine/single_core.py 100.00% <100.00%> (ø)
pypesto/engine/task.py 100.00% <100.00%> (ø)
pypesto/ensemble/__init__.py 100.00% <100.00%> (ø)
pypesto/ensemble/task.py 100.00% <100.00%> (ø)
pypesto/hierarchical/__init__.py 100.00% <100.00%> (ø)
... and 138 more

@dweindl dweindl marked this pull request as ready for review October 31, 2023 12:19
@dweindl dweindl self-assigned this Oct 31, 2023
Copy link
Collaborator

@PaulJonasJost PaulJonasJost left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup. If we remove the increase line search, perhaps we should also change the Literal/remove it? But not quite sure whether it is not used somewhere else.

@@ -62,14 +62,15 @@ def next_guess(
return fixed_step(
x, par_index, par_direction, profile_options, problem
)
elif update_type == 'adaptive_step_order_0':
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know that it technically makes no difference, but elif would highlight more, that these comparisons belong to each other wouldn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do they really belong together? I'd say no. Fixed step: we are good to go. Adaptive step; we need to set order. I think this makes it clearer.

Copy link
Collaborator

Choose a reason for hiding this comment

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

one can argue like that as well. No strong preference here 👍🏼

pypesto/profile/profile_next_guess.py Show resolved Hide resolved
@dweindl
Copy link
Member Author

dweindl commented Oct 31, 2023

If we remove the increase line search,

It's still there! See other comment.

@dweindl dweindl merged commit 59004de into develop Oct 31, 2023
15 of 17 checks passed
@dweindl dweindl deleted the cleanup_profile_next branch October 31, 2023 14:44
This was referenced Nov 15, 2023
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.

3 participants