Ml-agents: PyTorch in Release 7 (Requesting feedback)

Created on 25 Sep 2020  Â·  5Comments  Â·  Source: Unity-Technologies/ml-agents

Hi ML-A Community!

As you may have noticed, we have included PyTorch as an option for training in Release 7. We are planning to make PyTorch the default (and eventually sunset TensforFlow) in future releases.

With that, we want to hear from you all before we make these big changes. Please try it and post issues here or general discussions in our forums.

To use PyTorch, use --torch when running mlagents-learn, or add framework: pytorch to your trainer configuration (under the behavior name) to enable it.

Thanks!

Jeff

announcement

Most helpful comment

Our trainer code-base was written in TF v1. We were planning to move to TF v2 and away from using v1.compat in order to leverage the TF v2 upgrades and syntax.

With that, we decided to go with PyTorch instead of TF v2. Since we would have to refactor and move off of TF v1, we decided on PyTorch for a host of reasons (improve our internal velocity, adoption of PyTorch).

All 5 comments

But why? What is your rationale for favoring PyTorch over TF?

On Fri, Sep 25, 2020 at 3:05 PM Jeffrey Shih notifications@github.com
wrote:

Hi ML-A Community!

As you may have noticed, we have included PyTorch as an option for
training in Release 7. We are planning to make PyTorch the default (and
eventually sunset TensforFlow) in future releases.

With that, we want to hear from you all before we make these big changes.
Please try it and post issues here or general discussions in our forums.

To use PyTorch, use --torch when running mlagents-learn, or add framework:
pytorch to your trainer configuration (under the behavior name) to enable
it.

Thanks!

Jeff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Unity-Technologies/ml-agents/issues/4512, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABH7VG3LS633XH5ZWLPZCIDSHTSZLANCNFSM4R2ESFTQ
.

--
interFusion Games LLC - because it's fun

Our trainer code-base was written in TF v1. We were planning to move to TF v2 and away from using v1.compat in order to leverage the TF v2 upgrades and syntax.

With that, we decided to go with PyTorch instead of TF v2. Since we would have to refactor and move off of TF v1, we decided on PyTorch for a host of reasons (improve our internal velocity, adoption of PyTorch).

I for one very happily see the switch to PyTorch - it will make any future models and prototypes this much easier.

On this note, is it possible to (relatively easily) use custom models/training routines with the rest of the ML-A framework? Because I would see this as the main benefit of moving to PyTorch.

Hello,
I am the author of https://github.com/QuantScientist/TorchRayLib and a very fervent PyTorch advocate. I didn't even know about the ml-agents project.
I am mostly interested in combining Libtorch C++ into Unity though I have not experimented with that yet.

I would love to help,

hi @RedTachyon - we provide a lower level Python API for any custom training (https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Python-API.md)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hongsungchan picture Hongsungchan  Â·  3Comments

MarkTension picture MarkTension  Â·  3Comments

scotthovestadt picture scotthovestadt  Â·  4Comments

Procuste34 picture Procuste34  Â·  3Comments

Porigon45 picture Porigon45  Â·  3Comments