feat: support prime sandboxes#4
Conversation
alexzhang13
left a comment
There was a problem hiding this comment.
Will take a closer look soon, but before then can you also add an example (I will move these to test later when I figured out a way to run these kinds of tests without killing my credits) of doing persistent code execution inside the RL sandbox with a fake LLM (can also use a real LLM)?
There's an example called lm_in_repl.py as an example. Otherwise we can probably do some light testing and add this as a base. I just need to check that all the main components for communicating between the host process and sandbox are fine (it looks fine off a cursory glance though).
|
will do 👍 |
aa080cf to
876eb10
Compare
|
@13point5 Shoot me a comment when you want me to review! Only other thing is to remove the |
|
Fixing some bugs rn will let u know! |
ed429d9 to
107570e
Compare
107570e to
aee6ec7
Compare
|
ready for review @alexzhang13 |
|
Amazing! Will try to merge this in today. |
|
@13point5 Do you notice that the Prime sandboxes are really slow on your end? I'm not able to reproduce the runtimes in your example above, but it does run correctly (just takes a long time). They're experimental, so not sure if it's just something on their end. Can you just re-run the current version for me one more time and post the result here with |
|
Yea sometimes it's really slow @alexzhang13. I'll run it again with Should I remove |
|
Updated the PR description with latest execution times for the examples @alexzhang13
|
|
@13point5 That's ok, let's merge for now because it's functional but I'll add a warning to the README. We will return to this / fix this soon, I'll open up a separate issue for us to discuss how to optimize this later. Will also ping the Prime folks to figure this out as well. |
|
Awesome thank you! |
Add PrimeREPL environment for Prime Intellect sandboxes
Adds a new isolated environment that runs Python code in Prime Intellect sandboxes.
Changes
rlm/environments/prime_repl.py- FullPrimeREPLimplementation using HTTP broker pattern (same asModalREPL)examples/prime_repl_example.py- Simplerlm.completionexampleexamples/lm_in_prime_repl.py- Example with code execution inside the sandboxNotes
exec_script.pysometimes timed out with300swhich is why I increased it to600sExample outputs
prime_repl_example.pylm_in_prime_repl.py