Skip to content

Commit

Permalink
Added api_status option
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharvani2002 committed Oct 2, 2022
1 parent 7420296 commit b179b61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions vowpalwabbit/core/include/vw/core/global_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ struct workspace
// error reporting
std::shared_ptr<trace_message_wrapper> trace_message_wrapper_context;
std::unique_ptr<std::ostream> trace_message;
bool api_status = false;

std::unique_ptr<VW::config::options_i, options_deleter_type> options;

Expand Down
3 changes: 3 additions & 0 deletions vowpalwabbit/core/src/parse_args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ input_options parse_source(VW::workspace& all, options_i& options)
"hashed as A^B^C."))
.add(make_option("flatbuffer", parsed_options.flatbuffer)
.help("Data file will be interpreted as a flatbuffer file")
.experimental())
.add(make_option("api_status", all.api_status)
.help("api_status object will not be set to nullptr which will show detailed error information")
.experimental());
#ifdef VW_BUILD_CSV
parsed_options.csv_opts = VW::make_unique<VW::parsers::csv_parser_options>();
Expand Down

0 comments on commit b179b61

Please sign in to comment.