Batch scorefxn evaluation #257
Replies: 4 comments 4 replies
-
Hm… simplest workaround would probably be to create a separate score function for each process (ie pack not the score function but say its name or some object that specify it) |
Beta Was this translation helpful? Give feedback.
1 reply
-
Note that not all Rosetta scoreterms are threadsafe. Some cache data
internally during scoring. Additionally, cloning objects in Rosetta does
not reliably produce a deep clone, so scorefunctions or poses derived from
a common parent can continue to share data in a way that is not
threadsafe. (For poses, detached_copy() is the way to make a threadsafe
deep clone.) Use care when parallelizing this.
…On Wed, Dec 11, 2024, 9:45 AM john-zcliu ***@***.***> wrote:
Thank man! Yes, I ended up with passing the score funciton name into
subprocess.
—
Reply to this email directly, view it on GitHub
<#257 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABACZUF7IQT42MXBA3H4AJL2FBFW5AVCNFSM6AAAAABSVVOFM6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNJTGQYDONY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
3 replies
-
Also, the ref2015 scorefunction's terms are all threadsafe now. I just
meant the hundred or so other scoreterms that are available -- I can't
vouch for all of Rosetta scoring.
…On Thu, Dec 12, 2024 at 1:21 PM Rocco Moretti ***@***.***> wrote:
Most PyRosetta builds should be built with serialization. The Pose
serialization feature is intended to be used with inter-process
communication in a distributed environment. (See pyrosetta.distributedand
documentation surrounding it for examples.) -- If this is not working for
you for some reason, it would be considered to be a bug.
There should be very little internally cached state on scorefunctions.
Scorefunctions initialized with the same weights file and the same energy
method options (command line options) should work identically. Again, if
they don't, that would be considered a bug.
The issues Vikram mentioned are strictly due to *multi-threaded* use of
these objects. *Multi-processor* use of the objects ("distributed" type
pipelines) should not be affected by those concerns. (Note that Python
proper has also historically had issues with multithreading vs.
multiprocess parallelization.)
—
Reply to this email directly, view it on GitHub
<#257 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABACZUFMR747OIABINY5H5L2FHH3XAVCNFSM6AAAAABSVVOFM6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNJUG43TQMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you all for your constructive advice! I do appriciate them. I can happily work with my code now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to evaluate scorefxn for a lot of poses, but it seems the scorefxn can't be pickled. More details:
Error:
TypeError: cannot pickle 'pyrosetta.rosetta.core.scoring.ScoreFunction' object
May I ask if there is a better way of implementing this, or, if there is a version of the scorefxn that I should use.
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions