Epistimio / orion

Asynchronous Distributed Hyperparameter Optimization.
https://orion.readthedocs.io
Other
283 stars 52 forks source link

Mock web api for dashboard tests #1116

Closed notoraptor closed 1 year ago

notoraptor commented 1 year ago

Description

Hello @Delaunay ! This is a PR to help prevent dashboard tests failures.

Dashboard tests succeed on a local machine but sometimes fail on CI because of request timeouts. Although I don't yet know which exact piece of code is involved, I assume the issue is caused by CI insufficient resource for Orion web API to run correctly. However, the goal here is to test dashboard (ie. frontend UI), not web API (which does have its own Python tests). So I suggest to simply mock the web API for dashboard tests, making sure the mock is not more resource-consuming than the real Orion server.

To do that, this PR provides a fake Orion server, which just serves pre-recorded responses to API calls, without computing anything. It also runs dashboard tests 4 times in CI, and it seems to succeed.

What do you think?

Changes

Checklist

Tests

Documentation

Quality