mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-10-26 05:43:59 +03:00
Revert "Revert "Make default throw exception on abort for python (#333)""
This reverts commit 62ff781ed4
.
Sorry I should have realized Jerin was only amending python and
therefore this didn't break WASM.
Apologies to Jerin on this.
This commit is contained in:
parent
62ff781ed4
commit
f6d9233dc4
@ -33,7 +33,10 @@ PYBIND11_MAKE_OPAQUE(Alignments);
|
||||
|
||||
class ServicePyAdapter {
|
||||
public:
|
||||
ServicePyAdapter(const Service::Config &config) : service_(make_service(config)) {}
|
||||
ServicePyAdapter(const Service::Config &config) : service_(make_service(config)) {
|
||||
// Set marian to throw exceptions instead of std::abort()
|
||||
marian::setThrowExceptionOnAbort(true);
|
||||
}
|
||||
|
||||
std::shared_ptr<_Model> modelFromConfig(const std::string &config) {
|
||||
auto parsedConfig = marian::bergamot::parseOptionsFromString(config);
|
||||
|
Loading…
Reference in New Issue
Block a user