Skip to content

pickle error in load_tf_model #1

@jdc891010

Description

@jdc891010

/Encountering a "ValueError: unsupported pickle protocol: 5"

When trying to run the example code:

import pyoxynet

# Load the TFL model
tfl_model = pyoxynet.load_tf_model()

# Make inference on a random input
pyoxynet.test_tfl_model(tfl_model)

# Plot the inference on a test dataset
pyoxynet.test_pyoxynet()

forums mention that it has to do with the python env in which pickle was created, I am running it in 3.7, and from the DockerFile it seems that you prefer 3.8?

A possible easy fix, that I tested, is using the "import pickle5 as pickle" for py < 3.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions