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

@@ -20,14 +20,14 @@ void assignModel(argparse::ArgumentParser& parser)
{
auto models = platform::Models::instance();
parser.add_argument("-m", "--model")
.help("Model to use " + models->tostring())
.help("Model to use " + models->toString())
.required()
.action([models](const std::string& value) {
static const std::vector<std::string> choices = models->getNames();
if (find(choices.begin(), choices.end(), value) != choices.end()) {
return value;
}
throw std::runtime_error("Model must be one of " + models->tostring());
throw std::runtime_error("Model must be one of " + models->toString());
}
);
}
@@ -259,7 +259,7 @@ int main(int argc, char** argv)
}
}
if (!found) {
throw std::runtime_error("You must specify one of the following commands: dump, report, compute, export\n");
throw std::runtime_error("You must specify one of the following commands: dump, report, compute\n");
}
}
catch (const exception& err) {