Is your feature request related to a problem? Please describe.
When resolving larger stacks, it might happen that the resolution process does not reach exploitation phase for reinforcement learning algorithms as the temperature is decreasing slowly. To workaround this, it might be good to explicitly switch to exploitation phase once before the resolver is shut down gracefully by a signal in deployment.
Describe the solution you'd like
As of now, we send one signal signalizing the resolution process should stop after the given timeout in the liveness probe:
We could configure the liveness probe to send one signal (send after initialDelaySeconds configured from the liveness probe) which will turn the predictor into the exploitation phase (signalizing the resolution will soon finish) and the second signal (configured based on periodSeconds) would cause the resolver to halt and report the highest rated stack. This way we would not end with a highly rated stack not yet resolved in beam as the resolution process can find a better candidate:
Pipeline reached 2507 final states out of 100000 requested in iteration 52919 (pipeline pace 4.16 stacks/second); top rated software stack in beam has a score of 8.50; top rated software stack found so far has a score of 3.50
Is your feature request related to a problem? Please describe.
When resolving larger stacks, it might happen that the resolution process does not reach exploitation phase for reinforcement learning algorithms as the temperature is decreasing slowly. To workaround this, it might be good to explicitly switch to exploitation phase once before the resolver is shut down gracefully by a signal in deployment.
Describe the solution you'd like
As of now, we send one signal signalizing the resolution process should stop after the given timeout in the liveness probe:
https://github.com/thoth-station/adviser/blob/4d4eb9b5c75b709ef895cb37d7109abf8912ba2b/liveness.py#L49-L50
We could configure the liveness probe to send one signal (send after
initialDelaySeconds
configured from the liveness probe) which will turn the predictor into the exploitation phase (signalizing the resolution will soon finish) and the second signal (configured based onperiodSeconds
) would cause the resolver to halt and report the highest rated stack. This way we would not end with a highly rated stack not yet resolved in beam as the resolution process can find a better candidate: