Add command results to b_list

Rename tostring -> toString in models
Add datasets names to b_main command help - validation
This commit is contained in:
2024-03-10 12:16:02 +01:00
parent 4c847fc3f6
commit b3b3d9f1b9
9 changed files with 104 additions and 24 deletions

View File

@@ -85,13 +85,13 @@ int main(int argc, char** argv)
.default_value(std::string{ PATH }
);
program.add_argument("-m", "--model")
.help("Model to use " + platform::Models::instance()->tostring())
.help("Model to use " + platform::Models::instance()->toString())
.action([](const std::string& value) {
static const std::vector<std::string> choices = platform::Models::instance()->getNames();
if (find(choices.begin(), choices.end(), value) != choices.end()) {
return value;
}
throw runtime_error("Model must be one of " + platform::Models::instance()->tostring());
throw runtime_error("Model must be one of " + platform::Models::instance()->toString());
}
);
program.add_argument("--discretize").help("Discretize input dataset").default_value(false).implicit_value(true);