Skip to content
Snippets Groups Projects
Commit e6c1ed7c authored by Alex's avatar Alex
Browse files

Wowa state running during AUC computation.

parent a5d189df
No related branches found
No related tags found
1 merge request!1Include Wowa Training
Pipeline #5666 passed
......@@ -47,6 +47,8 @@ class ProcessAUC implements ShouldQueue
*/
public function handle()
{
$this->wowa->status = Wowa::STATE_RUNNING;
$this->wowa->save();
$solution = new SolutionDistance(count($this->wowa->w_weights));
$solution->weights_w = $this->wowa->w_weights;
$solution->weights_p = $this->wowa->p_weights;
......@@ -64,6 +66,8 @@ class ProcessAUC implements ShouldQueue
}
});
} catch (\Exception $e) {
$this->wowa->status = Wowa::STATE_FAILED;
$this->wowa->save();
}
}
if ($this->auc) {
......@@ -74,6 +78,7 @@ class ProcessAUC implements ShouldQueue
$solution->computePRAUC($this->data, $this->expected);
$this->wowa->pr = $solution->getAucPr();
}
$this->wowa->status = Wowa::STATE_SUCCESS;
$this->wowa->save();
}
}
......@@ -44,7 +44,7 @@
<b>AUC Roc curve</b> :
@if($wowa->roc == null)
@if($wowa->status == \App\Wowa::STATE_RUNNING)
<a class="btn btn-primary btn-sm" disabled="true"
<a class="btn btn-primary btn-sm" aria-disabled="true"
href="{{ action('WowaController@computeAUCRoc', ['wowa' => $wowa]) }}">
Compute AUC Roc
</a>
......@@ -62,20 +62,15 @@
<b>AUC P-R curve</b> :
@if($wowa->pr == null)
@if($wowa->status == \App\Wowa::STATE_RUNNING)
<a class="btn btn-primary btn-sm" disabled="true"
<a class="btn btn-primary btn-sm" aria-disabled=true"
href="{{ action('WowaController@computeAUCPR', ['wowa' => $wowa]) }}">
Compute AUC P-R
</a>
@else
<a id="pr" class="btn btn-primary btn-sm" onclick="toggleButton()"
<a id="pr" class="btn btn-primary btn-sm"
href="{{ action('WowaController@computeAUCPR', ['wowa' => $wowa]) }}">
Compute AUC P-R
</a>
<script>
function toggleButton() {
document.getElementById("pr").setAttribute("disabled", "true");
}
</script>
@endif
@else
{{ $wowa->pr }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment