-
Notifications
You must be signed in to change notification settings - Fork 105
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
[Bug]: Pickle Can't get attribute 'ObjectRef' #599
Comments
Currently, my Terminal shows: During handling of the above exception, another exception occurred: File "/home/warpoons/anaconda3/envs/spu_py310/lib/python3.10/logging/init.py", line 436, in _format During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): Thanks for your reading and looking forward to your reply! |
We have reproduced this issue, please try the 0.8.0b0 version for your current use. |
Thanks for your reply! I have another question: |
Currently, the offline and online stages are not separated in SPU. As for the communication and latency costs, you can use two configs |
Thanks for your patient response. Your suggestions have been of great help to me. |
I have an additional question about evaluating the model checkpoint. Sorry for taking your time. May I ask if there are any kinds of tutorials or guidelines regarding how to transform a highly-customized model architecture to be evaluable using SPU? Considering the (partial) convolutions or activations could be replaced by some cheaper variants, is the key to this question how to define the model using JAX instead of SPU itself? (since SPU is highly compatible with JAX). Appreciate your great efforts. Thanks! |
I think Puma's paper and its implementation in SPU may be a good tutorial. |
I will read this great article in detail, thank you! |
# Pull Request ## What problem does this PR solve? Issue Number: Fixed #599 ## Possible side effects? - Performance: - Backward compatibility:
Hi @tpppppub. Thanks for your idea on evaluating individual layers to obtain its private inference cost. I have tried the tutorial on "https://github.com/secretflow/spu/tree/main/examples/python/ml/flax_resnet" and it successfully works, indicating that evaluating ResNet50 models privately needs 2.6GB communication and 20+s latency. Now I would like to study the communication and latency costs of each linear/nonlinear layer in DNN and make further optimizations, but I'm not very sure how to evaluate individual each DNN layer since the model is integrally loaded into the program. May I ask if you can provide some specific tutorials, examples, or guidance? Thank you sooooooooo much for your time! |
SPU just runs Jax programs in an MPC manner. Model partitioning is done in the plaintext world and is out of the scope of SPU. In short, take a look at the model definition in the huggingface transformers library and use Flax to write your own model partition version. |
Thanks for your comments. I'll try this. |
Issue Type
Usability
Modules Involved
SPU compiler
Have you reproduced the bug with SPU HEAD?
Yes
Have you searched existing issues?
Yes
SPU Version
spu 0.9.0.dev20240311
OS Platform and Distribution
Ubuntu 18.04.6 LTS by WSL
Python Version
3.10
Compiler Version
GCC 11.3.0
Current Behavior?
A bug happened!
Standalone code to reproduce the issue
Relevant log output
The text was updated successfully, but these errors were encountered: