forked from enviPath/enviPy
Compare commits
11 Commits
feature/le
...
enhancemen
| Author | SHA1 | Date | |
|---|---|---|---|
| ab43e0b5fe | |||
| 91a52c254d | |||
| f7d88e4235 | |||
| b627a3850b | |||
| 1e5b8f5a63 | |||
| 2a3e418f5b | |||
| 393ec72523 | |||
| 932caa637b | |||
| ac58d58479 | |||
| 94abfc90b5 | |||
| 42b1e77fb9 |
@ -955,12 +955,6 @@ def package_model(request, package_uuid, model_uuid):
|
|||||||
]
|
]
|
||||||
dispatch(current_user, evaluate_model, current_model.pk, multigen, eval_package_ids)
|
dispatch(current_user, evaluate_model, current_model.pk, multigen, eval_package_ids)
|
||||||
|
|
||||||
return redirect(current_model.url)
|
|
||||||
elif hidden == "retrain":
|
|
||||||
from .tasks import dispatch, retrain
|
|
||||||
|
|
||||||
dispatch(current_user, retrain, current_model.pk)
|
|
||||||
|
|
||||||
return redirect(current_model.url)
|
return redirect(current_model.url)
|
||||||
else:
|
else:
|
||||||
return HttpResponseBadRequest()
|
return HttpResponseBadRequest()
|
||||||
|
|||||||
@ -1,55 +1,43 @@
|
|||||||
<div
|
<div class="modal fade" tabindex="-1" id="retrain_model_modal" role="dialog" aria-labelledby="retrain_model_modal"
|
||||||
class="modal fade"
|
aria-hidden="true">
|
||||||
tabindex="-1"
|
<div class="modal-dialog modal-lg">
|
||||||
id="retrain_model_modal"
|
<div class="modal-content">
|
||||||
role="dialog"
|
<div class="modal-header">
|
||||||
aria-labelledby="retrain_model_modal"
|
<button type="button" class="close" data-dismiss="modal">
|
||||||
aria-hidden="true"
|
<span aria-hidden="true">×</span>
|
||||||
>
|
<span class="sr-only">Close</span>
|
||||||
<div class="modal-dialog modal-lg">
|
</button>
|
||||||
<div class="modal-content">
|
<h4 class="modal-title">Retrain Model</h4>
|
||||||
<div class="modal-header">
|
</div>
|
||||||
<button type="button" class="close" data-dismiss="modal">
|
<div class="modal-body">
|
||||||
<span aria-hidden="true">×</span>
|
<form id="retrain_model_form" accept-charset="UTF-8" action="{{ meta.current_package.url }}/model"
|
||||||
<span class="sr-only">Close</span>
|
data-remote="true" method="post">
|
||||||
</button>
|
<div class="jumbotron">
|
||||||
<h4 class="modal-title">Retrain Model</h4>
|
To reflect changes in the rule or data packages, you can use the "Retrain" button,
|
||||||
</div>
|
to let the model reflect the changes without creating a new model.
|
||||||
<div class="modal-body">
|
While the model is retraining, it will be unavailable for prediction.
|
||||||
<form
|
</div>
|
||||||
id="retrain_model_form"
|
{% csrf_token %}
|
||||||
accept-charset="UTF-8"
|
<input type="hidden" name="action" value="retrain">
|
||||||
action="{{ meta.current_object.url }}"
|
</form>
|
||||||
data-remote="true"
|
</div>
|
||||||
method="post"
|
<div class="modal-footer">
|
||||||
>
|
<a id="retrain_model_form_submit" class="btn btn-primary" href="#">Retrain</a>
|
||||||
<div class="jumbotron">
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||||
To reflect changes in the rule or data packages, you can use the
|
</div>
|
||||||
"Retrain" button, to let the model reflect the changes without
|
</div>
|
||||||
creating a new model. While the model is retraining, it will be
|
|
||||||
unavailable for prediction.
|
|
||||||
</div>
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="hidden" value="retrain" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<a id="retrain_model_form_submit" class="btn btn-primary" href="#"
|
|
||||||
>Retrain</a
|
|
||||||
>
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
|
||||||
$("#retrain_model_form_submit").on("click", function (e) {
|
$(function () {
|
||||||
e.preventDefault();
|
|
||||||
$("#retrain_model_form").submit();
|
$('#retrain_model_form_submit').on('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$('#retrain_model_form').submit();
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user