I found the error message for the original xgbfir to be a bit more informative when using an invalid model file. Perhaps we could change the error message to something like the below?
Error: Invalid model file. Does not match regex (\d+):\[(.*?)(?:<(.+)|)\]\syes=(.*),no=(.*?),(?:missing=.*,)?gain=(.*),cover=(.*)
Did you dump the model w/ with_stats=True?
I found the error message for the original xgbfir to be a bit more informative when using an invalid model file. Perhaps we could change the error message to something like the below?