mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
![]() ## What do these changes do? Before this PR, if we want to specify some resources, we must do as following codes: ```java @RayRemote(Resources={ResourceItem("CPU", 10)}) public static void f1() { // do sth } @RayRemote(Resources={ResourceItem("CPU", 10)}) class Demo { // sth } ``` Unfortunately, it's no way for us to create another actor or task with different resources required. After this PR, the thing will be: ```java ActorCreationOptions option = new ActorCreationOptions(); option.resources.put("CPU", 4.0); RayActor<Echo> echo1 = Ray.createActor(Echo::new, option); option.resources.put("Res-A", 4.0); RayActor<Echo> echo2 = Ray.createActor(Echo::new, option); //if we don't specify resource, the resources will be `{"cpu":0.0}` by default. Ray.call(Echo::echo, echo2, 100); ``` ## Related issue number N/A |
||
---|---|---|
.. | ||
src/main/java/org/ray/api | ||
pom.xml |