agents
agents copied to clipboard
Reduce heavy mandatory dependencies for simple functionality
I would like to use some nice, general-purpose utilities from TF-Agents, for example the replay buffers. Is it possible to set things up so that utilities like this are usable without depending on, for example, libraries like MuJoCo or OpenAI Gym? It doesn't seem correct that something like tf_agents.replay_buffers
depends on on something like MuJoCo. This causes downstream problems: for example, it's not currently straightforward to use MuJoCo on a Mac M1, so it's not currently straightforward to use tf_agents
on a Mac M1 (pip3 install tf-agents && python3 -m tf_agents
results in OSError: Cannot find MuJoCo library at /Users/mishchea/.mujoco/mujoco210/bin/libmujoco210.dylib.
).
You should be able to use replay_buffers or any other utils from TF-Agents, although you probably need to clone the repository and use it directly, instead of pip install
it.
My concern isn't related to just getting things to work. I know I could copy-paste the relevant Python modules or just comment-out the imports I don't need.
My concern is, if I intend to share my code with someone else, or run it in another environment, I don't want to have to worry about either (1) copying my hacks/edits everywhere, or (2) requiring the deps for everyone, everywhere.
If you are interested in creating a PR which add an install option that avoids installing mujoco pip3 install tf-agents[nomujoco]
we can review it.