sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
05764b07af438235b0d81cf0edcbd9c6be6f73849b526d92b3e668389ccad343
Java
895
30
package io.ray.serve.poll; import java.io.Serializable; import java.util.Map; public class LongPollRequest implements Serializable { private static final long serialVersionUID = 6700308335001848617L; private Map<KeyType, Integer> keysToSnapshotIds; public LongPollRequest(Map<KeyType, Integer> keysToSnapshotI...
2db6ecc3ec527e01cd5c6affbf66259ba034846c660bfe5f703c06c699c16a60
Java
902
33
package io.ray.api; import io.ray.api.id.ActorId; /** * A handle to an actor. * * <p>A handle can be used to invoke a remote actor method. */ public interface BaseActorHandle { /** Returns the id of this actor. */ ActorId getId(); /** * Kill the actor immediately. This will cause any outstanding tasks ...
05cb8e094b6cdf25c11147498160f1ea19587a2f9e70dc054a69fbb61dbaccc7
Java
918
34
package io.ray.api.call; import io.ray.api.ObjectRef; import io.ray.api.PyActorHandle; import io.ray.api.Ray; import io.ray.api.function.PyActorMethod; /** * A helper to call python actor method. * * @param <R> The type of the python actor method return value */ public class PyActorTaskCaller<R> { private final...
0d1e481b2c390ce59ba4fb9ce870e34c555481706435f3a3d96e88c1d3bbdf6f
Java
921
34
package io.ray.api.call; import io.ray.api.CppActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import io.ray.api.function.CppActorMethod; /** * A helper to call cppthon actor method. * * @param <R> The type of the cpp actor method return value */ public class CppActorTaskCaller<R> { private fina...
7547fdd595de87f01566758d7b9847bc38bc815f6c6ae2c3700028d6e18243d9
Java
923
34
package io.ray.api.call; import io.ray.api.ActorHandle; import io.ray.api.Ray; import io.ray.api.function.RayFuncVoid; import io.ray.api.options.CallOptions; /** A helper to call java actor method which doesn't have a return value. */ public class VoidActorTaskCaller { private final ActorHandle actor; private fin...
aa54c640164d073f02b993a5789d2fbb3252c75f2477ecb92694408685e7c324
Java
928
30
package io.ray.test; import com.google.common.collect.ImmutableList; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import org.testng.Assert; import org.testng.annotations.Test; public class WorkerJvmOptionsTest extends BaseTest { public static class Echo { String getOptions...
fb9cd23a8bc4c08a43d7e29d69ccdd0d35656785f09f77f7ad82fc53650db0ef
Java
929
33
package io.ray.test; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.Test; public class LoggingPerfTest extends BaseTest { private static final Logger LOG = LoggerFactory.getLogger(LoggingPerfT...
2b1322f0b9f353c304dcb0044d9fa14a4f71a5690328b4a2d1797c6c2273200b
Java
933
42
package io.ray.serve.repdemo; import io.ray.serve.api.Serve; import io.ray.serve.deployment.Application; import java.util.Map; public class Hello { public static class HelloWorldArgs { private String message; public String getMessage() { return message; } public void setMessage(String messa...
8418111b8cb340f2ed2d81eb828d2b7e28800821179c0c9693a0d6fe5159333f
Java
933
44
package io.ray.api.runtimecontext; /** The state of an actor. Note, this class should be aligned with the actor state of proto. */ public enum ActorState { DEPENDENCIES_UNREADY("DEPENDENCIES_UNREADY", 0), PENDING_CREATION("PENDING_CREATION", 1), ALIVE("ALIVE", 2), RESTARTING("RESTARTING", 3), DEAD("DEAD", 4)...
fc22b7d43e1cba16c5b4f0b018863404dc84fc0eb4f4d923d42bf0e4e3dc1cc4
Java
961
37
package io.ray.serve.deployment; import io.ray.serve.util.ServeProtoUtil; public class DeploymentRoute { private final DeploymentInfo deploymentInfo; private final String route; public DeploymentRoute(DeploymentInfo deploymentInfo, String route) { this.deploymentInfo = deploymentInfo; this.route = ro...
6e0ea57efc7ff42b27c8d58f07efe2f6ed735d2072de2229d365b87afceb1a84
Java
966
36
package io.ray.runtime.actor; import com.google.common.base.Preconditions; import io.ray.api.PyActorHandle; import io.ray.runtime.generated.Common.Language; import java.io.IOException; import java.io.ObjectInput; /** Python actor handle implementation for cluster mode. */ public class NativePyActorHandle extends Nati...
589b61c1cc8e47d14e016248ac6882da84509e6fa834af410b26748fe6d06e8d
Java
969
27
package io.ray.runtime.metric; import java.util.List; /** * Native metric provide a native interface to register tag or metric for current metric package. */ class NativeMetric { public static native void registerTagkeyNative(String tagKey); public static native long registerCountNative( String name, Str...
e868af53752ea2a5189b82ba5d5fc18dca6ac9f35e1267a58226f80316897929
Java
981
28
package io.ray.runtime.config; import io.ray.runtime.generated.Common.WorkerType; import java.util.Collections; import org.testng.Assert; import org.testng.annotations.Test; public class RayConfigTest { @Test public void testCreateRayConfig() { System.setProperty("ray.job.code-search-path", "path/to/ray/job/...
166ff5a8e0d324ff365b0ffa598313d82daa37e5368c673aa97706e7af79e38e
Java
982
35
package io.ray.api.function; public class CppFunction<R> { // The name of this function public final String functionName; // Type of the return value of this function public final Class<R> returnType; private CppFunction(String functionName, Class<R> returnType) { this.functionName = functionName; t...
69804a42cf792c1e0f231014a1282b381cbc74b2ade24503673f50ca30e6af78
Java
985
31
package io.ray.runtime.util; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; public class ResourceUtil { /** * Get the device IDs in the CUDA_VISIBLE_DEVICES environment variable. The local mode is not * support. * * @return devices (List[...
42b27e459631f7d833d02bf282e4e38bccfd7c6f9f0986a787582689ea6f7c6d
Java
997
38
package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Random; /** Represents the id of a Ray object. */ public class ObjectId extends BaseId implements Serializable { public static final int LENGTH = 28; /** Create an ObjectId from a ByteBuffer...
aa5dfb3ae8a105bbd32c379f07643d482d5db982ac38fa79bcfe53b1bcb79607
Java
1,004
31
package io.ray.runtime.actor; import java.io.IOException; import org.nustaq.serialization.FSTBasicObjectSerializer; import org.nustaq.serialization.FSTClazzInfo; import org.nustaq.serialization.FSTClazzInfo.FSTFieldInfo; import org.nustaq.serialization.FSTObjectInput; import org.nustaq.serialization.FSTObjectOutput; ...
bd45d9d172a607b20406b4875db08df56b5dab48b6e8eccdffdf0e521bfc06cc
Java
1,009
56
package io.ray.test; import io.ray.api.ActorHandle; import io.ray.api.Ray; import org.testng.Assert; public class Counter { private int value; private ActorHandle<Counter> childActor; public Counter(int initValue) { this.value = initValue; } public int getValue() { return value; } public vo...
41d5333cb21d18883d7d32adc7503aa677a96963d6b3c9a2e9f8b8cd2f008d79
Java
1,019
36
package lychi; import java.util.Enumeration; import chemaxon.struc.Molecule; /** * Generic interface for generating tautomers */ public interface TautomerGenerator { // Return the number of tautomer generated public int getTautomerCount (); // Return the maximum number of tautomers to generate publi...
41cb053089685c4edf0c84771f61fedfe9bb733adf5b1d8e30ef9a2e88ce6a8e
Java
1,028
40
package io.ray.test; import com.google.common.collect.ImmutableList; import io.ray.api.ObjectRef; import io.ray.api.Ray; import java.util.List; import java.util.stream.Collectors; import org.testng.Assert; import org.testng.annotations.Test; /** Test putting and getting objects. */ public class ObjectStoreTest extend...
e2626465d259676ce0d37bd27b96db5d9d82525eb93d1f489a06c9a57ee2fc8d
Java
1,031
37
package Orion_Stardist; public class Box2D { public final long xmin, xmax, ymin, ymax; public Box2D(long xmin, long xmax, long ymin, long ymax) { assert (xmin <= xmax) && (ymin <= ymax); this.xmin = xmin; this.xmax = xmax; this.ymin = ymin; this.ymax = ymax; ...
26f000f5ced22066c988c1a08c9f65102dd87cbd866cbbe29d0279ac2cd84dcd
Java
1,037
35
package io.ray.api.function; public class CppActorMethod<R> { // The name of this actor method public final String methodName; // Type of the return value of this actor method public final Class<R> returnType; private CppActorMethod(String methodName, Class<R> returnType) { this.methodName = methodName;...
70657c7472e2f160c1116319447c672d5ff1ad54d7b1f2370b0a616fff41cf9a
Java
1,049
35
package io.ray.serve.docdemo; // docs-strategy-start import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Map.Entry; public class Strategy { public List<String> calc(Long time, Map<String, List<List<String>>> banksAndIndicators) { List<String> results = new ArrayList<>(); ...
9968c1ffa5b38d18fef23134a0a49e67ae45c45c8234b6365941de26c2a67577
Java
1,055
37
package Orion_Stardist; public class Orion_Box2D { public final long xmin, xmax, ymin, ymax; public Orion_Box2D(long xmin, long xmax, long ymin, long ymax) { assert (xmin <= xmax) && (ymin <= ymax); this.xmin = xmin; this.xmax = xmax; this.ymin = ymin; this.yma...
1ed189d198b09b7372f26c86199977d8ba7bae1031dad05e0d25c877a17a1344
Java
1,067
31
package io.ray.serve.docdemo.test; import io.ray.serve.BaseServeTest; import io.ray.serve.deployment.Deployment; import io.ray.serve.docdemo.ManageDeployment; import org.testng.Assert; import org.testng.annotations.Test; public class ManageDeploymentTest extends BaseServeTest { @Test( enabled = false, ...
33830133681f2d0c471b4360070ad0e3d262732e63801317d7e4b63df9c6eb7d
Java
1,070
46
package io.ray.serve.deployment; import io.ray.serve.generated.DeploymentStatus; public class DeploymentStatusInfo { private String name; private DeploymentStatus deploymentStatus; private String message = ""; public DeploymentStatusInfo(String name, DeploymentStatus deploymentStatus, String message) { ...
42d1257075db0af8ce82b07a6f62f3313e82712ed4a866b68a2bcbb014c5e0b9
Java
1,077
46
package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; import java.util.Arrays; /** Represents the id of a Ray task. */ public class TaskId extends BaseId implements Serializable { public static final int UNIQUE_BYTES_LENGTH = 8; public static final int LENGTH = ActorId.LENGTH + UNIQUE_...
e9224f48d653813dd2023c7337b156f27ef94c96865e9629b86bc842b85e8e44
Java
1,082
39
package io.ray.runtime.metric; import com.google.common.base.Preconditions; import java.util.Map; import java.util.stream.Collectors; /** Gauge measurement is mapped to gauge object in stats and is recording the last value. */ public class Gauge extends Metric { @Deprecated public Gauge(String name, String descr...
aad02245860e4dfb11f13f809eab9427f2c10161b1eb210ccd00e726c9eca144
Java
1,086
35
package io.ray.test; import com.google.common.collect.ImmutableList; import io.ray.api.ObjectRef; import io.ray.api.Ray; import io.ray.api.WaitResult; import java.util.List; import java.util.stream.Collectors; import org.testng.Assert; import org.testng.annotations.Test; /** Integration test for Ray.* */ public class...
570abb5d6891b6c404aef14c4b7f86e779a974ac4c180bb2b397500bc40b2fa8
Java
1,097
39
/* * #%L * Modified based on IPNAT.java of the ImageJ Strahler Analysis plugin by Tiago Ferreira. * * Major Modifications: * Deleted unused functions. * * Diana Bank, Inle Bush, and Elena Zhong, Chun Han Lab, Cornell University * #L% */ package dend; import ij.IJ; /** This class preserves the...
d103b38acea0df36de21d707931f34aa4701f6b0349e58ea288d2cedb6a8db29
Java
1,097
40
package io.ray.runtime.utils.parallelactor; import io.ray.api.ActorHandle; import io.ray.api.parallelactor.ParallelActorHandle; import io.ray.api.parallelactor.ParallelActorInstance; import java.io.Serializable; public class ParallelActorHandleImpl<A> implements ParallelActorHandle<A>, Serializable { private int p...
88d1b6dfccfa81e3bf3d2826c51ce6454ffbcbeba13f67a244a110242083b887
Java
1,101
31
package io.ray.runtime.serializer; import io.ray.runtime.actor.NativeActorHandle; import io.ray.runtime.actor.NativeActorHandleSerializer; import org.nustaq.serialization.FSTConfiguration; /** Java object serialization TODO: use others (e.g. Arrow) for higher performance */ public class FstSerializer { private sta...
43e4c0afff15e19bf609c80efab461cc5f8459aee4b869e50577c907ad11c027
Java
1,111
43
package io.ray.serve.repdemo; import io.ray.serve.api.Serve; import io.ray.serve.deployment.Application; import io.ray.serve.handle.DeploymentHandle; public class Text { public static class Hello { public String call() { return "Hello"; } } public static class World { public String call() { ...
95ef46331c61074972558e8e761b4bf839a5108459ec87078bd1f52e2c960ccf
Java
1,117
37
package io.ray.test; import io.ray.api.Ray; import org.apache.commons.lang3.SystemUtils; import org.testng.Assert; import org.testng.SkipException; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @Test(groups = {"cluster"}) public class NodeIpTest extends BaseTest { private static fi...
401d02118603ddbfbd4d6d55c9d41b1658c72f71f37adaa35e3b8d60a94b5651
Java
1,135
43
package io.ray.serve.deployment; import io.ray.serve.dag.DAGNode; import io.ray.serve.dag.DAGNodeBase; import java.util.Map; import java.util.function.Function; public class Application implements DAGNodeBase { private DAGNode internalDagNode; private Application(DAGNode internalDagNode) { this.internalDagNo...
007ec4e2f021d879ea3b367e520c35f686c46e3ce37c3ea5c74aa13c80b358ff
Java
1,138
38
package io.ray.test; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import java.util.concurrent.CountDownLatch; import org.testng.Assert; import org.testng.annotations.Test; @Test public class ActorConcurrentCallTest extends BaseTest { public static class ConcurrentActor { p...
d7abc81f733085766e4858de4533356720ffcbe154f2ff8b66953dae179ddf4d
Java
1,140
40
package io.ray.benchmark; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import org.testng.annotations.Test; public class MaxPressureTest extends RayBenchmarkTest { public static final int clientNum = 2; public static final int totalNum = 10; private static final long serial...
630132442264500b5c797f24cc32a28bbb70a67081fc7dfe12680e820a3e319e
Java
1,158
44
package io.ray.serve.dag; import io.ray.serve.deployment.Deployment; import io.ray.serve.handle.DeploymentHandle; import java.util.Map; public class DeploymentNode extends DAGNode { private String appName; private Deployment deployment; private DeploymentHandle deploymentHandle; public DeploymentNode( ...
fb9f89fef97bf87ea1bbcaadda360cc897578617ec51751d141d742febbf2cd3
Java
1,188
47
package io.ray.api.function; /** * A class that represents a Python actor class. * * <pre> * example_package/ * ├──__init__.py * └──example_module.py * * in example_module.py there is an actor class A. * * \@ray.remote * class A(object): * def __init__(self, x): * self.x = x * * we can creat...
57cfa068913dcd1bb8a727c6ac37a77828e34171c3d3380b7962156c0662ae2d
Java
1,191
45
package io.ray.api.call; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import io.ray.api.function.RayFuncR; import io.ray.api.options.CallOptions; /** * A helper to call java actor method. * * @param <R> The type of the java actor method return value */ public class ActorTaskC...
5f5f0a2709fe1378d91a18d8602d635833bc9473687c675a19f7234c691bffb2
Java
1,196
38
/* Copyright 2020 The Malaria Screener Authors. All Rights Reserved. This software was developed under contract funded by the National Library of Medicine, which is part of the National Institutes of Health, an agency of the Department of Health and Human Services, United States Government. Licensed under GNU General...
37c154d16f093cbd81d531f145df0bfe992c5eaa76eae10b5368bb8436ff5daa
Java
1,200
40
/* Copyright 2020 The Malaria Screener Authors. All Rights Reserved. This software was developed under contract funded by the National Library of Medicine, which is part of the National Institutes of Health, an agency of the Department of Health and Human Services, United States Government. Licensed under GNU General...
8ebbaa8fadd2b32b035660d9aa51d81235baa66126c68d259ca8c575a600d6ae
Java
1,213
39
/* * #%L * hIPNAT plugins for Fiji distribution of ImageJ * %% * Copyright (C) 2017 Tiago Ferreira * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License...
e196e272192a7a0a671f67b5d44fb88addec1cb53507257c3ad892466489825c
Java
1,213
41
package io.ray.test; import io.ray.api.ActorHandle; import io.ray.api.Ray; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @Test(groups = {"cluster"}) public class JobConfigTest extends BaseTest { @BeforeClass public void setupJobConfig() { System.setP...
dfd5d4fd50196d27dc7e30d7cf5979a6b93572294e824f56c2e233e4362f1f45
Java
1,229
51
package io.ray.serve; import io.ray.serve.controller.ServeController; import io.ray.serve.generated.EndpointInfo; import io.ray.serve.generated.EndpointSet; import io.ray.serve.poll.LongPollRequest; import io.ray.serve.util.ServeProtoUtil; import java.util.Map; public class DummyServeController implements ServeContro...
c498f881e088590b441c619993d803602a0bc64058dcaf3a00acc8a506c36262
Java
1,235
46
package io.ray.runtime.util; import java.io.IOException; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.util.concurrent.locks.ReentrantLock; /** some utilities for system process. */ public class SystemUtil { static final ReentrantLock pidlock = new ReentrantL...
f4d3f069aba15a175055901d0a1c27753e6dd0ea21e523d9b39c57b273592672
Java
1,235
40
/* Copyright 2020 The Malaria Screener Authors. All Rights Reserved. This software was developed under contract funded by the National Library of Medicine, which is part of the National Institutes of Health, an agency of the Department of Health and Human Services, United States Government. Licensed under GNU General...
806886a26df541cc93cf11c9cc424f9cf20123e8e9c2a69da72aaa14320ea69b
Java
1,240
52
package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Random; public class ActorId extends BaseId implements Serializable { private static final int UNIQUE_BYTES_LENGTH = 12; public static final int LENGTH = JobId.LENGTH + UNIQUE_BYTES_LENGTH; ...
267416dc653bd6c982db684b8af34f0946d47e374992ad3cb87dd476982f6d71
Java
1,243
47
package io.ray.runtime.metric; import com.google.common.base.Preconditions; import java.util.Map; import java.util.concurrent.atomic.DoubleAdder; import java.util.stream.Collectors; /** * Sum measurement is mapped to sum object in stats. Property sum is used for storing transient sum * for registry aggregation. */...
c82cba22bbe80debc2b7aa914c39e4f7f7d7d8f4349f9ff629217e545f810862
Java
1,244
43
package io.ray.runtime.object; import com.google.common.base.Preconditions; import io.ray.api.id.BaseId; import io.ray.api.id.ObjectId; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; /** Binary representation of a ray object. See `RayObject` class in C++ for details. */ publi...
bc40e7287c9b5bd6e6abc0e9c152b827f4c4daa3155fdf8c274e422a26a93ffe
Java
1,245
36
package io.ray.serve.context; import org.testng.Assert; import org.testng.annotations.Test; public class RequestContextTest { @Test public void test() { RequestContext context = RequestContext.get(); Assert.assertEquals(context.getRoute(), ""); Assert.assertEquals(context.getRequestId(), ""); Ass...
cea0258a54d6567329e9c6c5658dccf5a1ea27bba9b597a522eb6ed002da2399
Java
1,249
56
package io.ray.runtime.metric; import java.util.HashMap; import java.util.Map; import java.util.Objects; /** Tagkey is mapping java object to stats tagkey object. */ public class TagKey { private String tagKey; public TagKey(String key) { tagKey = key; NativeMetric.registerTagkeyNative(key); } publ...
c1ee02062bc0e6dbfa5061cd7c7c3ac0c52d9b5ba5e213454acf604555763d94
Java
1,252
42
package io.ray.benchmark; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import org.testng.annotations.Test; public class RateLimiterPressureTest extends RayBenchmarkTest { public static final int clientNum = 2; public static final int totalQps = 2; public static final int d...
5b0477d94dd427b3d1a62e54bc209d8e069e486689285c31cb32f295754bb086
Java
1,262
39
package io.ray.api.runtimeenv; /** A POJO class used to specify configuration options for a runtime environment. */ public class RuntimeEnvConfig { /** * The timeout of runtime environment creation, timeout is in seconds. The value `-1` means * disable timeout logic, except `-1`, `setup_timeout_seconds` cannot...
622dcf93ef53c020595b27f7634c85f5d1a2679e8c414fd54d4a9925b98e8d09
Java
1,265
48
package io.ray.runtime.metric; import com.google.common.base.Preconditions; import java.util.Map; import java.util.concurrent.atomic.DoubleAdder; import java.util.stream.Collectors; /** Count measurement is mapped to count object in stats and counts the number. */ public class Count extends Metric { private Double...
0e2c74eccb24a8d4adaf55b6594e944ac887a3e719bd481c6e0ca4bbc9f240b4
Java
1,267
49
// // This file is auto-generated. Please don't modify it! // package org.opencv.photo; import java.util.ArrayList; import java.util.List; import org.opencv.core.Algorithm; import org.opencv.core.Mat; import org.opencv.utils.Converters; // C++: class CalibrateCRF //javadoc: CalibrateCRF public class CalibrateCRF ext...
3dec9c9adfe929487476adde6fadc7299be644a4ef9c556e0879ebf05274dd67
Java
1,268
43
package io.ray.serve.repdemo; import io.ray.serve.api.Serve; import io.ray.serve.deployment.Application; import io.ray.serve.handle.DeploymentHandle; import io.ray.serve.handle.DeploymentResponse; public class Driver { private DeploymentHandle modelAHandle; private DeploymentHandle modelBHandle; public Driver(...
0423e312394b0d091645c32bca276bdad16e0793d517058541259484a54e03cd
Java
1,277
51
package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Random; /** Represents a unique id of all Ray concepts, including workers, actors, checkpoints, etc. */ public class UniqueId extends BaseId implements Serializable { public static final int LE...
17664bf8e9a7a9621f995317455c2dbe7a0e07aa31633062d88abe735e7e7ada
Java
1,277
48
package io.ray.test; import static io.ray.runtime.util.SystemUtil.pid; import io.ray.api.ActorHandle; import io.ray.api.Ray; import io.ray.runtime.util.SystemUtil; import java.util.concurrent.TimeUnit; import org.testng.Assert; import org.testng.annotations.Test; @Test(groups = {"cluster"}) public class ExitActorTes...
b439a2df02040edc62a52f11bb6f4a4b27f2dce5093227415111b7e743c77421
Java
1,282
49
package io.ray.serve.util; import java.io.IOException; import java.net.InetSocketAddress; import java.net.ServerSocket; public class SocketUtil { public static final int PORT_RANGE_MAX = 65535; public static int findAvailableTcpPort(int minPort) { int portRange = PORT_RANGE_MAX - minPort; int candidateP...
b79b481657eab3df7f84bcd226648d69407500af9a7c6047105a81dac8e973f7
Java
1,284
40
package org.opencv.android; /** * Interface for callback object in case of asynchronous initialization of OpenCV. */ public interface LoaderCallbackInterface { /** * OpenCV initialization finished successfully. */ static final int SUCCESS = 0; /** * Google Play Market cannot be invoked. ...
3bb403f223a0452cd7e54af8e05183abd4102ac3176d5bd9f51248097132e6e0
Java
1,301
43
package io.ray.serve; import io.ray.api.Ray; import io.ray.serve.api.Serve; import io.ray.serve.config.RayServeConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; public abstract class BaseServeTest2 { private static...
9de637ef8f7940505fc7de851e1938b38a59c7d61716fa6f4f48b2fc66a69dcd
Java
1,304
40
package io.ray.runtime.task; import io.ray.api.id.UniqueId; import io.ray.runtime.AbstractRayRuntime; /** * Task executor for cluster mode. * * <p>In cluster mode, each worker process serves exactly one actor. The C++ core worker runs {@code * ACTOR_CREATION_TASK} on the main event-loop thread and dispatches subs...
3e065209dffcbaf43a2d8dc73a947ab94894a81bfc31aa5e453fc7406e78fd74
Java
1,320
37
package io.ray.runtime.util; import io.ray.api.id.ActorId; import io.ray.api.id.ObjectId; import io.ray.api.id.TaskId; import java.util.Arrays; /** * Helper method for different Ids. Note: any changes to these methods must be synced with C++ * helper functions in src/ray/common/id.h */ public class IdUtil { /**...
1f2930bb01a53b4e3d417712b583be3d10626f0ac3bc7b23904d9eca61d21537
Java
1,342
45
package io.ray.test; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import java.util.ArrayList; import java.util.List; import org.testng.Assert; import org.testng.annotations.Test; public class ObjectRefTransferTest extends BaseTest { @Test public void testObjectTransfer() { ...
4bf89d1186e162cef781b661f5de4f28a2a95ef438cf4e155f29cd458079322a
Java
1,343
42
package io.ray.api.exception; import io.ray.api.id.ActorId; /** * Indicates that the actor died unexpectedly before finishing a task. * * <p>This exception could happen either because the actor process dies while executing a task, or * because a task is submitted to a dead actor. * * <p>If the actor died becaus...
af39615949ba750d573235dfc1b61d1ff9b1b30a1fbd269d363c26944711e1c1
Java
1,349
38
package io.ray.serve.config; import io.ray.serve.common.Constants; import java.io.Serializable; public class RequestRouterConfig implements Serializable { /** Frequency at which the controller will record request routing stats. */ private Double requestRoutingStatsPeriodS = Constants.DEFAULT_REQUEST_ROUTING_STATS...
7c5638c3c7103796d94854490fb95ee307d4c1cda35f3fc162e1b150bcbdc7b2
Java
1,351
49
package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Random; /** Represents the id of a placement group. */ public class PlacementGroupId extends BaseId implements Serializable { private static final int UNIQUE_BYTES_LENGTH = 14; public static...
d701ff86843979fde7b07ac7675f136a3a72c62b2c331e33d84259d189804cea
Java
1,354
42
package io.ray.test; import io.ray.api.Ray; import io.ray.api.runtimecontext.NodeInfo; import java.util.HashMap; import java.util.List; import java.util.Map; import org.testng.Assert; import org.testng.annotations.Test; @Test(groups = "cluster") public class NodeLabelSchedulingTest { public void testEmptyNodeLabels...
be7a4350ef2d9c90fd0200e828cdb01b8ba1a2a92cdb0206319479e8370823f5
Java
1,378
49
// // This file is auto-generated. Please don't modify it! // package org.opencv.photo; import java.util.ArrayList; import java.util.List; import org.opencv.core.Algorithm; import org.opencv.core.Mat; import org.opencv.utils.Converters; // C++: class MergeExposures //javadoc: MergeExposures public class MergeExposur...
3d5d3209eb0a8db7ef0fce7be6441f05c6563a1e53f127d95173ca4f4ab1ff91
Java
1,382
49
package io.ray.serve.poll; import io.ray.serve.exception.RayServeException; import java.io.Serializable; import java.util.function.Function; public class UpdatedObject implements Serializable { private static final long serialVersionUID = 4079205733405537177L; private int snapshotId; private Object objectSna...
113a3b11f08f5e4031e824de3c3f3d2163b82019f6a3935b21a86c89f83f9013
Java
1,406
56
package io.ray.runtime.functionmanager; import com.google.common.base.Objects; import io.ray.runtime.generated.Common.Language; import java.util.Arrays; import java.util.List; /** Represents metadata of a Cpp function. */ public class CppFunctionDescriptor implements FunctionDescriptor { public String createFuncti...
e355efa27cbb1a27075a18a8fc4d43c896a51e28d3baea9cb9416c4bb228090a
Java
1,414
56
package io.ray.runtime.functionmanager; import com.google.common.base.Objects; import io.ray.runtime.generated.Common.Language; import java.util.Arrays; import java.util.List; /** Represents metadata of a Python function. */ public class PyFunctionDescriptor implements FunctionDescriptor { public String moduleName...
93342ef0ce9d035f0b8fa9a6da30bc615575cc063aba027813bb0b877f3ec9ce
Java
1,416
63
// // This file is auto-generated. Please don't modify it! // package org.opencv.video; import org.opencv.core.Algorithm; import org.opencv.core.Mat; // C++: class DenseOpticalFlow //javadoc: DenseOpticalFlow public class DenseOpticalFlow extends Algorithm { protected DenseOpticalFlow(long addr) { super(addr); ...
5ce79e463a5910e7cae636ab8f17971cc3c6d9636d40a2fdafe15b1d357ce4c6
Java
1,419
51
/* Copyright 2020 The Malaria Screener Authors. All Rights Reserved. This software was developed under contract funded by the National Library of Medicine, which is part of the National Institutes of Health, an agency of the Department of Health and Human Services, United States Government. Licensed under GNU General...
4cacbd701ad2883fafd70055551c56df62fef6a46c3676d9597e5f56bce9a05f
Java
1,439
70
package io.ray.serve.replica; import java.util.Map; /** Stores data for Serve API calls from within deployments. */ public class ReplicaContext { private String deploymentName; private String replicaTag; private Object servableObject; private Map<String, String> config; private String appName; publi...
855b352699af4c6f91d632ee20963513007a959ce3bdc83bd68057c717a9d702
Java
1,455
46
/* Copyright 2020 The Malaria Screener Authors. All Rights Reserved. This software was developed under contract funded by the National Library of Medicine, which is part of the National Institutes of Health, an agency of the Department of Health and Human Services, United States Government. Licensed under GNU General...
c19171e6ad2cdc991368cb53d18dede96a9e567e5e78ff489ebcea952c00485d
Java
1,461
50
// // This file is auto-generated. Please don't modify it! // package org.opencv.photo; import java.util.ArrayList; import java.util.List; import org.opencv.core.Algorithm; import org.opencv.core.Mat; import org.opencv.utils.Converters; // C++: class AlignExposures //javadoc: AlignExposures public class AlignExposur...
f4d6af3f99cf96294131d1b49ff7d8dbc04f200335c0487fd5c0c1211612eea9
Java
1,461
32
// Theo Walker // Max Planck Florida Institute // naroom@gmail.com package cellMagicWand; public class Constants { public static double CIRCLE_THETA_MAX = 360; // public static final String PROGRAM_NAME = "CellMagicWand"; public static final int THETA_SAMPLES_FOR_RADIUS_FINDING = 100; //Parameters...
f33e4bd8981c8d2675e19b7b032d77e6c983f747587da19c2830657cd6376343
Java
1,464
55
package io.ray.benchmark; import io.ray.api.Ray; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MicroBenchmarks { private static final Logger LOGGER = LoggerFactory.getLogger(MicroBenchmarks.class); public static Object simpleFunction() { return null; } private static void time(R...
c93999ab234d5058d51d388e73273d0c7a3df9cbd2c5a97249711ff332203d14
Java
1,474
63
package io.ray.runtime.metric; import com.google.common.base.MoreObjects; import java.util.Map; import java.util.Objects; /** * MetricId represents a metric with a given type, name and tags. If two metrics have the same type * and name but different tags(including key and value), they have a different MetricId. And...
d889de15b87f7b074981fbde78fd378176b5bf599cade68a6d937b623f3de5a9
Java
1,483
57
package io.ray.api.placementgroup; import io.ray.api.id.PlacementGroupId; import java.util.List; import java.util.Map; /** * A placement group is used to place interdependent actors according to a specific strategy {@link * PlacementStrategy}. When a placement group is created, the corresponding actor slots and * ...
625fd30878ef944d7f65bfcd92975c6cdbdde8ae037ea7386f459cedbe3fff58
Java
1,526
60
package io.ray.api.id; import java.io.Serializable; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.Arrays; /** Represents the id of a Ray job. */ public class JobId extends BaseId implements Serializable { public static final int LENGTH = 4; public static final JobId NIL = genNil(); ...
65d8832fa9bebea82bb9e1688a7bf6c92280932e6970dd4f5953580e6d8fa5a9
Java
1,529
39
package io.ray.test; import io.ray.api.ActorHandle; import io.ray.api.Ray; import java.util.List; import org.testng.Assert; import org.testng.annotations.Test; public class GpuResourceTest { private static class GpuActor { public List<Long> getGpuResourceFunc() { return Ray.getRuntimeContext().getGpuIds()...
16d602799138a14b38672ff592d01b2a3070dd20a9c33c9724719b6ca9546f43
Java
1,531
67
package io.ray.api.runtimecontext; import io.ray.api.id.UniqueId; import java.util.Map; /** A class that represents the information of a node. */ public class NodeInfo { public final UniqueId nodeId; public final String nodeAddress; public final String nodeHostname; public final int nodeManagerPort; pu...
805ca990638bbf051be8442ef325798cad1894df7f5cf0f4e650d81e483117df
Java
1,534
52
package io.ray.runtime; import io.ray.api.Ray; import io.ray.api.concurrencygroup.ConcurrencyGroup; import io.ray.api.function.RayFunc; import io.ray.runtime.functionmanager.FunctionDescriptor; import io.ray.runtime.functionmanager.JavaFunctionDescriptor; import io.ray.runtime.functionmanager.RayFunction; import java....
a4d381b54b4dcd6d5db668c47cd6055461e7f0e9ce2870630b00a6708173e442
Java
1,544
60
package io.ray.runtime.functionmanager; import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import io.ray.runtime.generated.Common.Language; import java.io.Serializable; import java.util.List; /** Represents metadata of Java function. */ public final class JavaFunctionDescriptor imp...
4c77633bdb9d2391a4da05a78a3a145e689bdf991b9e105956d2a6df0a3344e4
Java
1,554
35
// Theo Walker // Max Planck Florida Institute // naroom@gmail.com package cellMagicWand; public class Constants { public static double CIRCLE_THETA_MAX = 360; // public static final String PROGRAM_NAME = "CellMagicWand"; public static final int THETA_SAMPLES_FOR_RADIUS_FINDING = 100; //Parameters...
187a7bc5cbb4174e542fae0e2c4dd036a6b6ba2327e74656ca05f0d816f39697
Java
1,559
51
package io.ray.test; import io.ray.api.ActorHandle; import io.ray.api.Ray; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @Test public class SetupJavaWorkerTest extends BaseTest { private static final String CODE_SE...
75bbe4495455d347895618996f7dfceaaaba95315541a14dd2a77e99f2a829ad
Java
1,564
50
package io.ray.runtime.util; import com.google.common.base.Strings; import java.net.Inet6Address; import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Enumeration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class NetworkUtil { private static final Logger LOGGER = Log...
8156e0d5dcfcbcbba091e0d2c139bf50a272e9409394c1d6a8be420d0bfec71c
Java
1,566
45
/* * #%L * Sholl_Analysis plugin for ImageJ * %% * Copyright (C) 2016 Tiago Ferreira * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or ...
6b49b68438c690e484f820d1c61ff246f31c617aba94a4200014eebf4327cb8c
Java
1,577
55
package io.ray.runtime.task; import io.ray.api.id.UniqueId; import io.ray.runtime.AbstractRayRuntime; /** * Task executor for local mode. * * <p>In local mode, multiple actors may share the same {@code TaskExecutor} instance but run on * different threads (each actor is dispatched to its own executor service thre...
29fa5576b6cfb90d7b962836900d41700279c3b68bda11f7122dcf04c63503d8
Java
1,598
59
package io.ray.serve.context; import java.util.Optional; public class RequestContext { private static RequestContext DEFAULT_CONTEXT = new RequestContext("", "", "", ""); private static ThreadLocal<RequestContext> SERVE_REQUEST_CONTEXT = ThreadLocal.withInitial(() -> DEFAULT_CONTEXT); private String ro...
704d228dbfa6967a38767eab3defef7b84a99417c953824610f5fc335de3b15c
Java
1,601
44
package io.ray.runtime; import io.ray.api.runtime.RayRuntime; import io.ray.api.runtime.RayRuntimeFactory; import io.ray.runtime.config.RayConfig; import io.ray.runtime.config.RunMode; import io.ray.runtime.generated.Common.WorkerType; import io.ray.runtime.util.LoggingUtil; import io.ray.runtime.util.SystemConfig; im...
d74923e857ff34f228542d68b369917c160673127934bc2ec5996cfb24902ef1
Java
1,605
51
package io.ray.runtime.actor; import io.ray.api.ActorHandle; import io.ray.api.id.ActorId; import io.ray.api.id.ObjectId; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.concurrent.atomic.AtomicReference; /** Implementation of actor ...
ff75d98961df415be022d3d43ae0b201b0b222e79792446ec08f53b91a2f4c0e
Java
1,619
45
package io.ray.serve.util; import com.google.protobuf.ByteString; import io.ray.serve.generated.RequestMetadata; import io.ray.serve.generated.RequestWrapper; import org.apache.commons.lang3.RandomStringUtils; import org.testng.Assert; import org.testng.annotations.Test; public class ServeProtoUtilTest { @Test p...
46e6a03808a34bf26bd6697c7caeda0a47840711e0201e24f70d707d7dd9d3bd
Java
1,624
80
// // This file is auto-generated. Please don't modify it! // package org.opencv.photo; import org.opencv.core.Algorithm; import org.opencv.core.Mat; // C++: class Tonemap //javadoc: Tonemap public class Tonemap extends Algorithm { protected Tonemap(long addr) { super(addr); } // internal usage only pu...
d2560c9b1b3a59a9a03767e6b88595c972c34035f57a34de736347bf74bcc54e
Java
1,638
49
package io.ray.test; import com.google.common.base.Preconditions; import io.ray.api.id.JobId; import io.ray.api.runtimecontext.NodeInfo; import io.ray.runtime.config.RayConfig; import io.ray.runtime.gcs.GcsClient; import java.util.List; import org.apache.commons.lang3.SystemUtils; import org.testng.Assert; import org....
127e2b24a6dbde45c62918d7b14e3f88ed9e1a8e990a89ff42abc384f74c75ab
Java
1,657
56
package io.ray.runtime.task; import com.google.common.base.Preconditions; import io.ray.api.id.ObjectId; import io.ray.runtime.generated.Common.Address; import io.ray.runtime.object.NativeRayObject; /** * Represents a function argument in task spec. Either `id` or `data` should be null, when id is not * null, this ...
d841bf48aed66f18441d0fc05988a4bafb95bfa0b576c9164b83d2c815353eba
Java
1,663
40
package io.ray.runtime.utils.parallelactor; import com.google.common.base.Preconditions; import io.ray.api.Ray; import io.ray.runtime.AbstractRayRuntime; import io.ray.runtime.functionmanager.FunctionManager; import io.ray.runtime.functionmanager.JavaFunctionDescriptor; import io.ray.runtime.functionmanager.RayFunctio...