Skip to content

UntrustedTypesFoundException raised for standard library usage in lightgbm's Booster #432

@thesnapdragon

Description

@thesnapdragon

Hello there,

after updating to 0.10.0 we got the following error:

...
File "/app/sales_prediction/common/result_storage.py", line 74, in get_train_result
return TrainResult(booster=skops.io.loads(model_data, trusted=["lightgbm.basic.Booster"]))
File "/opt/pysetup/.venv/lib/python3.10/site-packages/skops/io/_persist.py", line 191, in loads
audit_tree(tree)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/skops/io/_audit.py", line 59, in audit_tree
raise UntrustedTypesFoundException(unsafe)
skops.io.exceptions.UntrustedTypesFoundException: Untrusted types found in the file: ['collections.defaultdict'].

In the serialised object we only have a single lightgbm.basic.Booster object.

  1. Should the standard library be untrusted?
  2. In this case the defaultdict is an internal details in the lightgbm's Booster. When the Booster is marked as trusted, should the internally used subdependencies still be untrusted?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions