Fixed MHOD: first updating windows, then selecting estimates
This commit is contained in:
parent
022effa50f
commit
4668e2e7c4
@ -118,13 +118,6 @@ def mhod(state_config, otf, window_sizes, bruteforce_step, learning_steps,
|
|||||||
total_time = len(utilization)
|
total_time = len(utilization)
|
||||||
state_vector = build_state_vector(state_config, utilization)
|
state_vector = build_state_vector(state_config, utilization)
|
||||||
current_state = get_current_state(state_vector)
|
current_state = get_current_state(state_vector)
|
||||||
selected_windows = estimation.select_window(
|
|
||||||
state['variances'],
|
|
||||||
state['acceptable_variances'],
|
|
||||||
window_sizes)
|
|
||||||
p = estimation.select_best_estimates(
|
|
||||||
state['estimate_windows'],
|
|
||||||
selected_windows)
|
|
||||||
|
|
||||||
state['request_windows'] = estimation.update_request_windows(
|
state['request_windows'] = estimation.update_request_windows(
|
||||||
state['request_windows'],
|
state['request_windows'],
|
||||||
@ -144,6 +137,14 @@ def mhod(state_config, otf, window_sizes, bruteforce_step, learning_steps,
|
|||||||
state['previous_state'])
|
state['previous_state'])
|
||||||
state['previous_state'] = current_state
|
state['previous_state'] = current_state
|
||||||
|
|
||||||
|
selected_windows = estimation.select_window(
|
||||||
|
state['variances'],
|
||||||
|
state['acceptable_variances'],
|
||||||
|
window_sizes)
|
||||||
|
p = estimation.select_best_estimates(
|
||||||
|
state['estimate_windows'],
|
||||||
|
selected_windows)
|
||||||
|
|
||||||
log.debug('MHOD utilization:' + str(utilization))
|
log.debug('MHOD utilization:' + str(utilization))
|
||||||
if len(utilization) >= learning_steps:
|
if len(utilization) >= learning_steps:
|
||||||
state_history = utilization_to_states(state_config, utilization)
|
state_history = utilization_to_states(state_config, utilization)
|
||||||
|
Loading…
Reference in New Issue
Block a user