Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate is failing outside my code with a pickling issue after my predict function ends #1602

Open
ryx2 opened this issue Mar 28, 2024 · 0 comments

Comments

@ryx2
Copy link

ryx2 commented Mar 28, 2024

During my predict() function, I initialize a class called EachPredictor, and assign it to a dict inside the Predictor. However, every call errors after the predict function is finished, with this:

Traceback (most recent call last):
File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/cog/server/worker.py", line 226, in _predict
self._events.send(PredictionOutput(payload=make_encodeable(result)))
File "/root/.pyenv/versions/3.10.13/lib/python3.10/multiprocessing/connection.py", line 206, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/root/.pyenv/versions/3.10.13/lib/python3.10/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'predict.EachPredictor'>: it's not the same object as predict.EachPredictor

This was not an issue just a couple of days ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant