RL icon indicating copy to clipboard operation
RL copied to clipboard

Custom worker environment doesn't support extra libraries

Open bogdansalyp opened this issue 7 months ago • 3 comments

Describe the bug

NemoRL allows to create custom environments and custom workers. If any additional package is needed in a custom environment, it's enough to use py_executable uv run --with <extra_package> but with custom worker it doesn't work.

So far looks like /opt/venvs/... is created and then reused without considering "--with" package

Steps/Code to reproduce bug

TODO (for me): to create a reproducible setup for this bug as it may not be obvious what I mean by custom worker

Expected behavior

Either fix uv run --with or support shell=True in subprocess.run to have py_executable like uv add <extra_package> && uv run

bogdansalyp avatar Apr 02 '26 21:04 bogdansalyp

I would like to work on it. Could you assign it to me?

zeel2104 avatar Apr 03 '26 14:04 zeel2104

Hi @bogdansalyp . We recently added a change to allow people to extend the worker classes we define without changing the core worker class. See https://github.com/NVIDIA-NeMo/RL/pull/2094/changes#diff-94306475b42d88dabf744645e4c77c40604dfd8c14f999c27e4bbe5695ee0a7f

Does this provide enough flexibility or is there still something missing? In this "extension" way of working, you register a new "uv run" with the actor registry to call so you could try to add other requirements you need. If that doesn't work, could you share what this is missing?

Thanks @zeel2104 for jumping in. First I'd like to understand the requirements first and see what we need to build. If it's a fairly large change needed, we would need some design first before jumping into implementation.

terrykong avatar Apr 03 '26 22:04 terrykong

cc @yuki-97

terrykong avatar Apr 03 '26 22:04 terrykong