GRAAL-Research / deepparse

Deepparse is a state-of-the-art library for parsing multinational street addresses using deep learning

Home Page:https://deepparse.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add exception handling

MAYAS3 opened this issue · comments

I don't see place where we should handle exceptions.

Maybe a raise exception when downloading the weights and the pre-trained embedding model but even that I'm not sure the plus value of that.

I agree that we'll need this more when we add training functions. One place I think it could be useful is when instantiating the AddressParser since we expect device to be exactly "cpu" if it's a string and a positive integer if it's an int. Same thing with model that needs to be a specific string value so we could raise an exception there. What do you think?

I agree that we'll need this more when we add training functions. One place I think it could be useful is when instantiating the AddressParser since we expect device to be exactly "cpu" if it's a string and a positive integer if it's an int. Same thing with model that needs to be a specific string value so we could raise an exception there. What do you think?

True, we should manage a little bit more the case of model and device. Will push something.