FLAIROx / JaxMARL

Multi-Agent Reinforcement Learning with JAX
Apache License 2.0
393 stars 68 forks source link

To what extent is it possible to use SMAX in code that was originally designed for SMAC v1/PyTorch? #91

Closed Chulabhaya closed 4 months ago

Chulabhaya commented 4 months ago

Hey all! I'm interested in testing out some algorithms to see how they perform in SMAX. However these algorithms were initially designed around SMAC and are PyTorch-based code.

I was wondering if it's reasonable to think that I could still use SMAX with these code-bases but just swap out SMAC environmental references with appropriate SMAX ones? I am not interested in converting these algorithms to JAX, I just want to evaluate their performance on some of the SMAX tasks (my own project is in JAX however, and is based on SMAX).

benellis3 commented 4 months ago

Yeah you can do this -- you would just need to change the environment references and convert the tensor types. Getting it to work might be tricky because I can't guarantee that there aren't subtle differences in the environment set-ups that make training break.

From a quick google, you can use e.g. https://github.com/lucidrains/jax2torch and https://github.com/samuela/torch2jax to help with interoperability

Chulabhaya commented 4 months ago

I'll take a look at these as a starting point, thank you!