Skip to content

Bug: numpy default rng persistence #329

@BenjaminBossan

Description

@BenjaminBossan

EDIT: I see what's going on, I'm on it.

When trying to determine the unsafe set of a numpy random Generator, there is an error. To reproduce:

def test_default_rng():
    import skops.io as sio
    rng = np.random.default_rng()
    sio.loads(sio.dumps(rng), trusted=[])

We test this class but only with trusted=True, which is why we didn't encounter the error in our test suite.

I haven't dug into the source of the problem, but possibly it's related to Generator being a cython class.

Maybe we should tighten our tests by relying as little as possible on trusted=True.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpersistenceSecure persistence feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions