0

The ray tutorial explains, that for having a method on an object, which returns multiple object_ids one can use the @ray.method() decorator see here. But in the example 'Learning to play Pong' the method compute gradient actually has two return values, which are called as object_ids later, but it is not coded as ray.method with the respective decoratorsee here. I would like to understand what the use of ray.method is now.

LJKS
  • 899
  • 2
  • 9
  • 17

1 Answers1

1

It will return a tuple when fetching the object.

The equivalent paradigm in Python is:

def test():
    return 1, 2

a = test()
assert a == (1, 2)
richliaw
  • 1,925
  • 16
  • 14