Search Unity

grpc collision

Discussion in 'ML-Agents' started by mamaorha, Apr 26, 2021.

  1. mamaorha

    mamaorha

    Joined:
    Jun 16, 2015
    Posts:
    44
    Hi,
    im have a project that communicate with another server via GRPC.
    using - grpc.tools.2.26.0 im generating my c# classes and all works well until i add ML-agents, it seems like the package contains Grpc.Core inside it which collides with the one im using.

    any recommendation? (tried removing my/your Grpc.Core but it seems that they dont match and the generated classes wont compile)
     
  2. christophergoy

    christophergoy

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi,
    ML-Agents uses gRPC 1.41.0. You could try to re-generate the protobuf files in the protobuf-definitions folder in the repo with the version you are using, and then replace our version of gRPC with your updated one. There are other changes that need to be made in order to make sure that a Channel is shut down properly that you can find in this PR. (you just need the changes to RPCCommunicator).

    There is no guarantee that this will work as I have not tested grpc 2.26.0. But if you are willing to try, you can potentially get your version of ml-agents to work with a newer grpc.
     
  3. mamaorha

    mamaorha

    Joined:
    Jun 16, 2015
    Posts:
    44
    thanks for the quick reply, actually i think the other way around would be better (if i generate my proto files using the version you used).
     
    Last edited: Apr 27, 2021
  4. mamaorha

    mamaorha

    Joined:
    Jun 16, 2015
    Posts:
    44
    k got it to work (compiling my files with 1.41.0) - is there a reason why ml-agents is using such old version? are there plans to upgrade?
     
  5. Russellmj

    Russellmj

    Joined:
    May 6, 2021
    Posts:
    1
    how did you compile with gRPC 1.41.0. I am having the same issue you are having but the latest version of gRPC I can find is v1.38.0