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

new parallel advantage assessment support #685

Merged
merged 20 commits into from
Mar 12, 2022

Conversation

donglinjy
Copy link
Collaborator

@donglinjy donglinjy commented Nov 2, 2021

Description

Implementation for #657

Changes

Support a new assessment ParallelAdvantage

from orion.benchmark.assessment import ParallelAdvantage

ParallelAdvantage(executor="joblib", n_workers=[1, 2, 4], backend="threading")

image

image

image

Checklist

Tests

  • I added corresponding tests for bug fixes and new features. If possible, the tests fail without the changes
  • All new and existing tests are passing ($ tox -e py38; replace 38 by your Python version if necessary)

Documentation

  • I have updated the relevant documentation related to my changes

Quality

  • I have read the CONTRIBUTING doc
  • My commits messages follow this format
  • My code follows the style guidelines ($ tox -e lint)

@donglinjy donglinjy marked this pull request as ready for review November 3, 2021 05:10
@bouthilx
Copy link
Member

bouthilx commented Jan 5, 2022

@donglinjy
Copy link
Collaborator Author

donglinjy commented Jan 8, 2022

Thanks for the updates! There are only a few comments remaining that still need to be discussed or fixed. Many are related to discussing whether the plotting function should be reusing regret.

These 2 selected was already handled. I need find a time slot for other potentials code refines, but this one #685 (comment) should be easy and can be done soon.

@bouthilx
Copy link
Member

These 2 selected was already handled. I need find a time slot for other potentials code refines, but this one #685 (comment) should be easy and can be done soon.

Alright, thanks!

duration_col = "duration_mean" if "duration_mean" in exp_data else "duration"
durations = exp_data[duration_col].tolist()
unit_time = durations[-1] / len(durations)
if unit_time > 60 * 60 * 24:
Copy link
Member

Choose a reason for hiding this comment

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

Factoring out this part as a function would make it easy to test it separately. I think we should have a min number of units to select seconds, minutes, etc. If we select minute instead of seconds for instance, there should be at least 3 of 4 minutes so that the tick labels are > 1. Otherwise it would hurt readability. The factors (ex: 60 * 60 * 24) could be multiplied by this min number of units.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean factoring the code to compute duration and time_unit as a function?
Let's make the min number of unit as 3.

Copy link
Member

@bouthilx bouthilx Mar 2, 2022

Choose a reason for hiding this comment

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

Yep, having a function like this duration, unit_time = infer_unit_time(durations, min_unit=3)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated in 884eaff

Copy link
Member

Choose a reason for hiding this comment

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

Looks like the test did not cover this case: 884eaff#diff-3de0162ba5d54eda9f327045182609e93571e11db5ad711067d7c54c02155d52R633. Otherwise it's good! :)

experiments,
with_evc_tree=True,
order_by="suggested",
build_frame_fn=build_regrets_frame,
Copy link
Member

Choose a reason for hiding this comment

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

That's a great way of factoring it out! I think the regrets implementation will be better after this PR than it was before. Thanks! :)

@bouthilx
Copy link
Member

Beside code coverage for the x-axis label and unit, and the minimum number of units for the conversion, I believe this PR all good and will be ready for merge. Thanks!

Copy link
Member

@bouthilx bouthilx left a comment

Choose a reason for hiding this comment

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

All good, thanks!

@bouthilx
Copy link
Member

bouthilx commented Mar 9, 2022

Oh, it looks like there is an issue with the rebase on develop after merge of #810.

@bouthilx
Copy link
Member

bouthilx commented Mar 9, 2022

Fixed in #828

@bouthilx bouthilx merged commit 9217eaa into Epistimio:develop Mar 12, 2022
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.

None yet

2 participants