change order of augmentation in init prompt
@@ -229,38 +229,6 @@ def ask_questions():
'default': True
}
- if prompt(enable_data_augmentation):
- all_augmentor = {}
- checkboxes = []
- for name, obj in inspect.getmembers(augmentor):
- if inspect.isclass(obj) and issubclass(obj, Processor):
- argspec = inspect.getfullargspec(obj)
- # ignore self
- args = argspec.args[1:]
- defaults = argspec.defaults
- if len(args) == len(defaults):
- default_val = [(arg, default) for arg, default in zip(args, defaults)]
- default_str = " (default: {})".format(", ".join(["{}={}".format(a, d) for a, d in default_val]))
- else:
- defaults = ("# Please fill a value.",) * (len(args) - len(defaults)) + defaults
- default_val = [(arg, default) for arg, default in zip(args, defaults)]
- default_str = " (**caution**: No default value is provided, \
-please modify manually after config exported.)"
-
- all_augmentor[name + default_str] = {"name": name, "defaults": default_val}
- checkboxes.append({"name": name + default_str, "value": name})
- data_augmentation_question = {
- 'type': 'checkbox',
- 'name': 'value',
- 'message': 'Please choose augmentors:',
- 'choices': checkboxes
- }
- data_augmentation_res = prompt(data_augmentation_question)
- data_augmentation = {}
- if data_augmentation_res:
- for v in data_augmentation_res:
- data_augmentation[all_augmentor[v]["name"]] = all_augmentor[v]["defaults"]
-
train_dataset_path_question = {
'type': 'input',
'name': 'value',
@@ -339,6 +307,38 @@ please modify manually after config exported.)"
tmp_learning_rate_setting = prompt(training_learning_rate_question)
training_learning_rate_setting = choices_key_map[tmp_learning_rate_setting]
+ if prompt(enable_data_augmentation):
+ all_augmentor = {}
+ checkboxes = []
+ for name, obj in inspect.getmembers(augmentor):
+ if inspect.isclass(obj) and issubclass(obj, Processor):
+ argspec = inspect.getfullargspec(obj)
+ # ignore self
+ args = argspec.args[1:]
+ defaults = argspec.defaults
+ if len(args) == len(defaults):
+ default_val = [(arg, default) for arg, default in zip(args, defaults)]
+ default_str = " (default: {})".format(", ".join(["{}={}".format(a, d) for a, d in default_val]))
+ else:
+ defaults = ("# Please fill a value.",) * (len(args) - len(defaults)) + defaults
+ default_val = [(arg, default) for arg, default in zip(args, defaults)]
+ default_str = " (**caution**: No default value is provided, \
+please modify manually after config exported.)"
+
+ all_augmentor[name + default_str] = {"name": name, "defaults": default_val}
+ checkboxes.append({"name": name + default_str, "value": name})
+ data_augmentation_question = {
+ 'type': 'checkbox',
+ 'name': 'value',
+ 'message': 'Please choose augmentors:',
+ 'choices': checkboxes
+ }
+ data_augmentation_res = prompt(data_augmentation_question)
+ data_augmentation = {}
+ if data_augmentation_res:
+ for v in data_augmentation_res:
+ data_augmentation[all_augmentor[v]["name"]] = all_augmentor[v]["defaults"]
+
quantize_first_convolution_question = {
'type': 'rawlist',
'name': 'value',
