Support lightgbm model loading from a string instead of file (#1136)

Co-authored-by: Bedrich Pisl <bedrich.pisl@colsys.cz>
This commit is contained in:
bedapisl 2023-10-15 11:28:54 +02:00 committed by GitHub
parent 040fd671a4
commit 8a834af777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ class PatchLIGHTgbmModelIO(PatchBaseModelIO):
return ret return ret
@staticmethod @staticmethod
def _load(original_fn, model_file, *args, **kwargs): def _load(original_fn, model_file=None, *args, **kwargs):
if not PatchLIGHTgbmModelIO._current_task: if not PatchLIGHTgbmModelIO._current_task:
return original_fn(model_file, *args, **kwargs) return original_fn(model_file, *args, **kwargs)