mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 04:23:03 +08:00
Revert "Updating zero capacity resource semantics (#4555)"
This reverts commit 0f42f87ebc.
This commit is contained in:
@@ -7,19 +7,13 @@ import java.util.Map;
|
||||
* The options class for RayCall or ActorCreation.
|
||||
*/
|
||||
public abstract class BaseTaskOptions {
|
||||
public final Map<String, Double> resources;
|
||||
public Map<String, Double> resources;
|
||||
|
||||
public BaseTaskOptions() {
|
||||
resources = new HashMap<>();
|
||||
}
|
||||
|
||||
public BaseTaskOptions(Map<String, Double> resources) {
|
||||
for (Map.Entry<String, Double> entry : resources.entrySet()) {
|
||||
if (entry.getValue().compareTo(0.0) <= 0) {
|
||||
throw new IllegalArgumentException(String.format("Resource capacity should be " +
|
||||
"positive, but got resource %s = %f.", entry.getKey(), entry.getValue()));
|
||||
}
|
||||
}
|
||||
this.resources = resources;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user