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

Convert functional algo tests to python API #418

Merged
merged 4 commits into from
Jul 2, 2020

Conversation

bouthilx
Copy link
Member

@bouthilx bouthilx commented Jul 2, 2020

Description

The commandline API adds a significant overhead for cheap functions to evaluate. In the functional tests for the algorithms, the executions for the trials represents more than 75% of the whole running time of tests, with each trial execution taking more than 1s. Converting these tests to the Python API reduced tests from 130s each to 5s.

Changes

  • Convert functional algo tests to python API
  • Avoid changing the seed in hyperband (see commit message for more details)

bouthilx added 2 commits July 2, 2020 11:44
Why:

The commandline API was adding a signicant overhead (>1s per calls).
Migrating to python API reduce most test from 150s to 5s.
Why:

Changing the seed has the effect of changing the configuration of the
algorithm.

How:

Use the same root seed and only increment within set_rng based on number
of repetitions.

Note:

No unittests are added since configuration of algos is automatically
tested at end of functional tests.
@bouthilx bouthilx added this to the v0.1.9 milestone Jul 2, 2020
@bouthilx bouthilx mentioned this pull request Jul 2, 2020
Copy link
Contributor

@Thomsch Thomsch left a comment

Choose a reason for hiding this comment

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

Great test refactoring ❤️

Why:

If workon fails, the new storage is kept and the previous one is lost.
The previous one should be restored and the temporary EphemeralDB should
be flushed.

How:

In workon, wrap the execution with a try-finally and revert storage in
any case.
@bouthilx
Copy link
Member Author

bouthilx commented Jul 2, 2020

Fix MacOS Timeout

@bouthilx bouthilx merged commit 7c68109 into Epistimio:develop Jul 2, 2020
@bouthilx
Copy link
Member Author

bouthilx commented Jul 2, 2020

Failing backward-compatibility tests due to orion.core pypi project deletion. Fix coming in another PR.

This was referenced Nov 5, 2020
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.

2 participants