Add split method

Change-Id: Ib937b0e87bff50b8b3aa2746dd739856045f7730
This commit is contained in:
Hiroyuki Eguchi 2017-02-11 15:05:09 +09:00
parent 0197f4572b
commit 98870cc4e8
4 changed files with 29 additions and 3 deletions

View File

@ -28,7 +28,8 @@ EXPERIMENT_CREATE_ATTRS = ['display_name', 'display_description', 'key_name',
'neutron_management_network', 'template_id']
DATASET_CREATE_ATTRS = ['method', 'source_dataset_url', 'display_name',
'display_description', 'experiment_id', 'params',
'swift_tenant', 'swift_username', 'swift_password']
'percent_train', 'percent_test', 'swift_tenant',
'swift_username', 'swift_password']
MODEL_CREATE_ATTRS = ['source_dataset_url', 'display_name',
'display_description', 'experiment_id',
'model_type', 'model_params', 'dataset_format',

View File

@ -41,6 +41,8 @@
source_dataset_url: null,
experiment_id: null,
params: null,
percent_train: null,
percent_test: null,
swift_tenant: null,
swift_username: null,
swift_password: null

View File

@ -16,7 +16,29 @@
</div>
</div>
</div>
<div class="col-xs-12">
<div class="col-xs-12"
ng-if="model.newDatasetSpec.method == 'split'">
<div class="form-group">
<label class="control-label" for="dataset-percent-train">
<translate>Percentage for Training</translate>
<span class="hz-icon-required fa fa-asterisk"></span>
</label>
<input name="dataset-percent-train" type="text" class="form-control" id="dataset-percent-train"
ng-model="model.newDatasetSpec.percent_train"
placeholder="{$ 'Percentage for Training.'|translate $}">
</div>
<div class="form-group">
<label class="control-label" for="dataset-percent-test">
<translate>Percentage for Evaluation</translate>
<span class="hz-icon-required fa fa-asterisk"></span>
</label>
<input name="dataset-percent-test" type="text" class="form-control" id="dataset-percent-test"
ng-model="model.newDatasetSpec.percent_test"
placeholder="{$ 'Percentage for Evaluation.'|translate $}">
</div>
</div>
<div class="col-xs-12"
ng-if="model.newDatasetSpec.method == 'parse'">
<div class="form-group">
<label class="control-label" for="dataset-params">
<translate>Params</translate>

View File

@ -36,7 +36,8 @@
ctrl.datasetMethodOptions = [
{ label: gettext('Download'), value: 'download' },
{ label: gettext('Parse'), value: 'parse' }
{ label: gettext('Parse'), value: 'parse' },
{ label: gettext('Split'), value: 'split' }
];
}