file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/StreamingWorkerConfig.java
Java
package org.ray.streaming.runtime.config; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Streaming job worker specified config. */ public class StreamingWorkerConfig extends StreamingGlobalConfig { private static final Logger LOG = LoggerFactory.getLogger(StreamingWorkerConf...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/config/global/CommonConfig.java
Java
package org.ray.streaming.runtime.config.global; import org.ray.streaming.runtime.config.Config; /** * Job common config. */ public interface CommonConfig extends Config { String JOB_ID = "streaming.job.id"; String JOB_NAME = "streaming.job.name"; /** * Ray streaming job id. Non-custom. * @return Job ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/collector/OutputCollector.java
Java
package org.ray.streaming.runtime.core.collector; import java.nio.ByteBuffer; import java.util.Collection; import org.ray.runtime.util.Serializer; import org.ray.streaming.api.collector.Collector; import org.ray.streaming.api.partition.Partition; import org.ray.streaming.message.Record; import org.ray.streaming.runtim...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/command/BatchInfo.java
Java
package org.ray.streaming.runtime.core.command; import java.io.Serializable; public class BatchInfo implements Serializable { private long batchId; public BatchInfo(long batchId) { this.batchId = batchId; } public long getBatchId() { return batchId; } public void setBatchId(long batchId) { ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionEdge.java
Java
package org.ray.streaming.runtime.core.graph; import java.io.Serializable; import org.ray.streaming.api.partition.Partition; /** * An edge in the physical execution graph. */ public class ExecutionEdge implements Serializable { private int srcNodeId; private int targetNodeId; private Partition partition; p...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionGraph.java
Java
package org.ray.streaming.runtime.core.graph; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.ray.api.RayActor; import org.ray.streaming.runtime.worker.JobWorker; /** * Physical execution gr...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionNode.java
Java
package org.ray.streaming.runtime.core.graph; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.ray.streaming.jobgraph.VertexType; import org.ray.streaming.operator.StreamOperator; /** * A node in the physical execution graph. */ public class ExecutionNode implements Seriali...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/graph/ExecutionTask.java
Java
package org.ray.streaming.runtime.core.graph; import java.io.Serializable; import org.ray.api.RayActor; import org.ray.streaming.runtime.worker.JobWorker; /** * ExecutionTask is minimal execution unit. * <p> * An ExecutionNode has n ExecutionTasks if parallelism is n. */ public class ExecutionTask implements Seri...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/OneInputProcessor.java
Java
package org.ray.streaming.runtime.core.processor; import org.ray.streaming.message.Record; import org.ray.streaming.operator.OneInputOperator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class OneInputProcessor<T> extends StreamProcessor<Record<T>, OneInputOperator<T>> { private static final Lo...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/ProcessBuilder.java
Java
package org.ray.streaming.runtime.core.processor; import org.ray.streaming.operator.OneInputOperator; import org.ray.streaming.operator.OperatorType; import org.ray.streaming.operator.StreamOperator; import org.ray.streaming.operator.TwoInputOperator; import org.ray.streaming.operator.impl.SourceOperator; import org.s...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/Processor.java
Java
package org.ray.streaming.runtime.core.processor; import java.io.Serializable; import java.util.List; import org.ray.streaming.api.collector.Collector; import org.ray.streaming.api.context.RuntimeContext; public interface Processor<T> extends Serializable { void open(List<Collector> collectors, RuntimeContext runt...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/SourceProcessor.java
Java
package org.ray.streaming.runtime.core.processor; import org.ray.streaming.message.Record; import org.ray.streaming.operator.impl.SourceOperator; /** * The processor for the stream sources, containing a SourceOperator. * * @param <T> The type of source data. */ public class SourceProcessor<T> extends StreamProces...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/StreamProcessor.java
Java
package org.ray.streaming.runtime.core.processor; import java.util.List; import org.ray.streaming.api.collector.Collector; import org.ray.streaming.api.context.RuntimeContext; import org.ray.streaming.operator.Operator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * StreamingProcessor is a process un...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/core/processor/TwoInputProcessor.java
Java
package org.ray.streaming.runtime.core.processor; import org.ray.streaming.message.Record; import org.ray.streaming.operator.TwoInputOperator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TwoInputProcessor<T, O> extends StreamProcessor<Record, TwoInputOperator<T, O>> { private static final ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/JobSchedulerImpl.java
Java
package org.ray.streaming.runtime.schedule; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.ray.api.Ray; import org.ray.api.RayActor; import org.ray.api.RayObject; import org.ray.streaming.jobgraph.JobGraph; import org.ray.streaming.jobgraph.JobVertex; import org.ray.streaming.runti...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/TaskAssigner.java
Java
package org.ray.streaming.runtime.schedule; import java.io.Serializable; import java.util.List; import org.ray.api.RayActor; import org.ray.streaming.jobgraph.JobGraph; import org.ray.streaming.runtime.core.graph.ExecutionGraph; import org.ray.streaming.runtime.worker.JobWorker; /** * Interface of the task assigning...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/schedule/TaskAssignerImpl.java
Java
package org.ray.streaming.runtime.schedule; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.ray.api.RayActor; import org.ray.streaming.jobgraph.JobEdge; import org.ray.streaming.jobgraph.JobGraph; import org.ray.streaming...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelID.java
Java
package org.ray.streaming.runtime.transfer; import com.google.common.base.FinalizablePhantomReference; import com.google.common.base.FinalizableReferenceQueue; import com.google.common.base.Preconditions; import com.google.common.collect.Sets; import com.google.common.io.BaseEncoding; import java.lang.ref.Reference; i...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelInitException.java
Java
package org.ray.streaming.runtime.transfer; import java.util.ArrayList; import java.util.List; public class ChannelInitException extends Exception { private final List<byte[]> abnormalQueues; public ChannelInitException(String message, List<byte[]> abnormalQueues) { super(message); this.abnormalQueues =...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelInterruptException.java
Java
package org.ray.streaming.runtime.transfer; public class ChannelInterruptException extends RuntimeException { public ChannelInterruptException() { super(); } public ChannelInterruptException(String message) { super(message); } }
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/ChannelUtils.java
Java
package org.ray.streaming.runtime.transfer; import java.util.Map; import org.ray.streaming.runtime.generated.Streaming; import org.ray.streaming.util.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ChannelUtils { private static final Logger LOGGER = LoggerFactory.getLogger(ChannelUtils...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataMessage.java
Java
package org.ray.streaming.runtime.transfer; import java.nio.ByteBuffer; /** * DataMessage represents data between upstream and downstream operator */ public class DataMessage implements Message { private final ByteBuffer body; private final long msgId; private final long timestamp; private final String chan...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataReader.java
Java
package org.ray.streaming.runtime.transfer; import com.google.common.base.Preconditions; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Queue; import org.ray.api.id.ActorId; import org.ray.streaming.runtime.util.Platform...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/DataWriter.java
Java
package org.ray.streaming.runtime.transfer; import com.google.common.base.Preconditions; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.List; import java.util.Map; import java.util.Set; import org.ray.api.id.ActorId; import org.ray.streaming.runtime.util.Platform; import org.ray.streaming.util...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/Message.java
Java
package org.ray.streaming.runtime.transfer; import java.nio.ByteBuffer; public interface Message { /** * Message data * * Message body is a direct byte buffer, which may be invalid after call next * <code>DataReader#getBundleNative</code>. Please consume this buffer fully * before next call <code>ge...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/transfer/TransferHandler.java
Java
package org.ray.streaming.runtime.transfer; import com.google.common.base.Preconditions; import org.ray.runtime.RayNativeRuntime; import org.ray.runtime.functionmanager.FunctionDescriptor; import org.ray.runtime.functionmanager.JavaFunctionDescriptor; import org.ray.runtime.util.JniUtils; /** * TransferHandler is us...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/EnvUtil.java
Java
package org.ray.streaming.runtime.util; import org.ray.runtime.RayNativeRuntime; import org.ray.runtime.util.JniUtils; public class EnvUtil { public static void loadNativeLibraries() { // Explicitly load `RayNativeRuntime`, to make sure `core_worker_library_java` // is loaded before `streaming_java`. t...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/util/Platform.java
Java
package org.ray.streaming.runtime.util; import com.google.common.base.Preconditions; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.nio.Buffer; import java.nio.ByteBuffer; import sun.misc.Unsafe; import sun.nio.ch.DirectBuffer; /**...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/JobWorker.java
Java
package org.ray.streaming.runtime.worker; import java.io.Serializable; import java.util.Map; import org.ray.api.Ray; import org.ray.api.annotation.RayRemote; import org.ray.runtime.RayMultiWorkerNativeRuntime; import org.ray.runtime.functionmanager.JavaFunctionDescriptor; import org.ray.streaming.runtime.core.graph.Ex...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/context/RayRuntimeContext.java
Java
package org.ray.streaming.runtime.worker.context; import static org.ray.streaming.util.Config.STREAMING_BATCH_MAX_COUNT; import java.util.Map; import org.ray.streaming.api.context.RuntimeContext; import org.ray.streaming.runtime.core.graph.ExecutionTask; /** * Use Ray to implement RuntimeContext. */ public class R...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/context/WorkerContext.java
Java
package org.ray.streaming.runtime.worker.context; import java.io.Serializable; import java.util.Map; import org.ray.streaming.runtime.core.graph.ExecutionGraph; /** * Encapsulate the context information for worker initialization. */ public class WorkerContext implements Serializable { private int taskId; priva...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/InputStreamTask.java
Java
package org.ray.streaming.runtime.worker.tasks; import org.ray.runtime.util.Serializer; import org.ray.streaming.runtime.core.processor.Processor; import org.ray.streaming.runtime.transfer.Message; import org.ray.streaming.runtime.worker.JobWorker; import org.ray.streaming.util.Config; public abstract class InputStre...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/OneInputStreamTask.java
Java
package org.ray.streaming.runtime.worker.tasks; import org.ray.streaming.runtime.core.processor.Processor; import org.ray.streaming.runtime.worker.JobWorker; public class OneInputStreamTask<IN> extends InputStreamTask { public OneInputStreamTask(int taskId, Processor processor, JobWorker streamWorker) { super(...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/SourceStreamTask.java
Java
package org.ray.streaming.runtime.worker.tasks; import org.ray.streaming.runtime.core.processor.Processor; import org.ray.streaming.runtime.core.processor.SourceProcessor; import org.ray.streaming.runtime.worker.JobWorker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SourceStreamTask<IN> exte...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/main/java/org/ray/streaming/runtime/worker/tasks/StreamTask.java
Java
package org.ray.streaming.runtime.worker.tasks; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.ray.api.Ray; import org.ray.api.RayActor; import org.ray.api.id.ActorId; import org.ray.streaming.api.collector.Collector; import org.ray.streaming.api.context.R...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/BaseUnitTest.java
Java
package org.ray.streaming.runtime; import java.lang.reflect.Method; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; public abstract class...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/TestHelper.java
Java
package org.ray.streaming.runtime; public class TestHelper { private static volatile boolean UT_FLAG = false; public static void setUTFlag() { UT_FLAG = true; } public static void clearUTFlag() { UT_FLAG = false; } public static boolean isUT() { return UT_FLAG; } }
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/config/ConfigTest.java
Java
package org.ray.streaming.runtime.config; import java.util.HashMap; import java.util.Map; import org.aeonbits.owner.ConfigFactory; import org.nustaq.serialization.FSTConfiguration; import org.ray.streaming.runtime.BaseUnitTest; import org.ray.streaming.runtime.config.global.CommonConfig; import org.testng.Assert; impo...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/demo/WordCountTest.java
Java
package org.ray.streaming.runtime.demo; import com.google.common.collect.ImmutableMap; import org.ray.streaming.api.context.StreamingContext; import org.ray.streaming.api.function.impl.FlatMapFunction; import org.ray.streaming.api.function.impl.ReduceFunction; import org.ray.streaming.api.function.impl.SinkFunction; i...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/schedule/TaskAssignerImplTest.java
Java
package org.ray.streaming.runtime.schedule; import java.util.ArrayList; import java.util.List; import com.google.common.collect.Lists; import org.ray.api.RayActor; import org.ray.api.id.ActorId; import org.ray.api.id.ObjectId; import org.ray.runtime.actor.LocalModeRayActor; import org.ray.streaming.api.context.Stream...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java
Java
package org.ray.streaming.runtime.streamingqueue; import com.google.common.collect.ImmutableMap; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.lang.management.Management...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/streamingqueue/Worker.java
Java
package org.ray.streaming.runtime.streamingqueue; import java.lang.management.ManagementFactory; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import org.ray.api.Ray; import org.ray.api.RayActor; import org.ray.ap...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/streaming-runtime/src/test/java/org/ray/streaming/runtime/transfer/ChannelIDTest.java
Java
package org.ray.streaming.runtime.transfer; import static org.testng.Assert.assertEquals; import org.ray.streaming.runtime.BaseUnitTest; import org.ray.streaming.runtime.util.EnvUtil; import org.testng.annotations.Test; public class ChannelIDTest extends BaseUnitTest { static { EnvUtil.loadNativeLibraries(); ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/java/test.sh
Shell
#!/usr/bin/env bash # Cause the script to exit if a single command fails. set -e # Show explicitly which commands are currently running. set -x ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) run_testng() { "$@" || exit_code=$? # exit_code == 2 means there are skipped tests. if [ $exit_code -ne 2 ]...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/__init__.py
Python
# flake8: noqa # Ray should be imported before streaming import ray
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/_streaming.pyx
Cython
# cython: profile=False # distutils: language = c++ # cython: embedsignature = True # cython: language_level = 3 include "includes/transfer.pxi"
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/communication.py
Python
import hashlib import logging import pickle import sys import time import ray import ray.streaming.runtime.transfer as transfer from ray.streaming.config import Config from ray.streaming.operator import PStrategy from ray.streaming.runtime.transfer import ChannelID logger = logging.getLogger(__name__) logging.basicCo...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/config.py
Python
class Config: STREAMING_JOB_NAME = "streaming.job.name" STREAMING_OP_NAME = "streaming.op_name" TASK_JOB_ID = "streaming.task_job_id" STREAMING_WORKER_NAME = "streaming.worker_name" # channel CHANNEL_TYPE = "channel_type" MEMORY_CHANNEL = "memory_channel" NATIVE_CHANNEL = "native_channel...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/examples/key_selectors.py
Python
import argparse import logging import time import ray from ray.streaming.streaming import Environment logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser() parser.add_argument("--input-file", required=True, help="the input text file") # A class used to chec...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/examples/simple.py
Python
import argparse import logging import time import ray from ray.streaming.config import Config from ray.streaming.streaming import Environment, Conf logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser() parser.add_argument("--input-file", required=True, help="...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/examples/wordcount.py
Python
import argparse import logging import time import ray import wikipedia from ray.streaming.streaming import Environment logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser() parser.add_argument( "--titles-file", required=True, help="the file contai...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/includes/libstreaming.pxd
Cython
# cython: profile=False # distutils: language = c++ # cython: embedsignature = True # cython: language_level = 3 # flake8: noqa from libc.stdint cimport * from libcpp cimport bool as c_bool from libcpp.memory cimport shared_ptr from libcpp.vector cimport vector as c_vector from libcpp.list cimport list as c_list from ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/jobworker.py
Python
import logging import pickle import threading import ray import ray.streaming._streaming as _streaming from ray.streaming.config import Config from ray.function_manager import FunctionDescriptor from ray.streaming.communication import DataInput, DataOutput logger = logging.getLogger(__name__) @ray.remote class JobW...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/operator.py
Python
import enum import logging import cloudpickle logger = logging.getLogger(__name__) logger.setLevel("DEBUG") # Stream partitioning schemes class PScheme: def __init__(self, strategy, partition_fn=None): self.strategy = strategy self.partition_fn = partition_fn def __repr__(self): ret...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/processor.py
Python
import logging import sys import time import types logger = logging.getLogger(__name__) logger.setLevel("INFO") def _identity(element): return element class ReadTextFile: """A source operator instance that reads a text file line by line. Attributes: filepath (string): The path to the input fil...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/runtime/transfer.py
Python
import logging import random from queue import Queue from typing import List import ray import ray.streaming._streaming as _streaming import ray.streaming.generated.streaming_pb2 as streaming_pb from ray.actor import ActorHandle, ActorID from ray.streaming.config import Config CHANNEL_ID_LEN = 20 class ChannelID: ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/streaming.py
Python
import logging import pickle import sys import time import networkx as nx import ray import ray.streaming.processor as processor import ray.streaming.runtime.transfer as transfer from ray.streaming.communication import DataChannel from ray.streaming.config import Config from ray.streaming.jobworker import JobWorker fr...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/tests/test_direct_transfer.py
Python
import pickle import threading import time import ray import ray.streaming._streaming as _streaming import ray.streaming.runtime.transfer as transfer from ray.function_manager import FunctionDescriptor from ray.streaming.config import Config @ray.remote class Worker: def __init__(self): core_worker = ray...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/tests/test_logical_graph.py
Python
from ray.streaming.streaming import Environment, ExecutionGraph from ray.streaming.operator import OpType, PStrategy def test_parallelism(): """Tests operator parallelism.""" env = Environment() # Try setting a common parallelism for all operators env.set_parallelism(2) stream = env.source(None).m...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/python/tests/test_word_count.py
Python
import ray from ray.streaming.config import Config from ray.streaming.streaming import Environment, Conf def test_word_count(): ray.init() env = Environment(config=Conf(channel_type=Config.NATIVE_CHANNEL)) env.read_text_file(__file__) \ .set_parallelism(1) \ .filter(lambda x: "word" in x) ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/channel.cc
C++
#include "channel.h" #include <unordered_map> namespace ray { namespace streaming { ProducerChannel::ProducerChannel(std::shared_ptr<Config> &transfer_config, ProducerChannelInfo &p_channel_info) : transfer_config_(transfer_config), channel_info(p_channel_info) {} ConsumerChannel:...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/channel.h
C/C++ Header
#ifndef RAY_CHANNEL_H #define RAY_CHANNEL_H #include "config/streaming_config.h" #include "queue/queue_handler.h" #include "ring_buffer.h" #include "status.h" #include "util/streaming_util.h" namespace ray { namespace streaming { struct StreamingQueueInfo { uint64_t first_seq_id = 0; uint64_t last_seq_id = 0; ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/config/streaming_config.cc
C++
#include <unistd.h> #include "streaming_config.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { uint64_t StreamingConfig::TIME_WAIT_UINT = 1; uint32_t StreamingConfig::DEFAULT_RING_BUFFER_CAPACITY = 500; uint32_t StreamingConfig::DEFAULT_EMPTY_MESSAGE_TIME_INTERVAL = 20; // Time to force ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/config/streaming_config.h
C/C++ Header
#ifndef RAY_STREAMING_CONFIG_H #define RAY_STREAMING_CONFIG_H #include <cstdint> #include <string> #include "protobuf/streaming.pb.h" #include "ray/common/id.h" namespace ray { namespace streaming { class StreamingConfig { public: static uint64_t TIME_WAIT_UINT; static uint32_t DEFAULT_RING_BUFFER_CAPACITY; ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/data_reader.cc
C++
#include <algorithm> #include <chrono> #include <cstdlib> #include <iostream> #include <memory> #include <thread> #include "ray/util/logging.h" #include "ray/util/util.h" #include "data_reader.h" #include "message/message_bundle.h" namespace ray { namespace streaming { const uint32_t DataReader::kReadItemTimeout = ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/data_reader.h
C/C++ Header
#ifndef RAY_DATA_READER_H #define RAY_DATA_READER_H #include <cstdlib> #include <functional> #include <queue> #include <string> #include <unordered_map> #include <vector> #include "channel.h" #include "message/message_bundle.h" #include "message/priority_queue.h" #include "runtime_context.h" namespace ray { namespac...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/data_writer.cc
C++
#include <memory> #include <memory> #include <signal.h> #include <unistd.h> #include <chrono> #include <functional> #include <list> #include <numeric> #include "data_writer.h" #include "util/streaming_util.h" namespace ray { namespace streaming { void DataWriter::WriterLoopForward() { STREAMING_CHECK(RuntimeStat...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/data_writer.h
C/C++ Header
#ifndef RAY_DATA_WRITER_H #define RAY_DATA_WRITER_H #include <cstring> #include <mutex> #include <string> #include <thread> #include <vector> #include "channel.h" #include "config/streaming_config.h" #include "message/message_bundle.h" #include "runtime_context.h" namespace ray { namespace streaming { /// DataWrite...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.cc
C++
#include "org_ray_streaming_runtime_transfer_ChannelID.h" #include "streaming_jni_common.h" using namespace ray::streaming; JNIEXPORT jlong JNICALL Java_org_ray_streaming_runtime_transfer_ChannelID_createNativeID( JNIEnv *env, jclass cls, jlong qid_address) { auto id = ray::ObjectID::FromBinary( std::strin...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/org_ray_streaming_runtime_transfer_ChannelID.h
C/C++ Header
/* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_ray_streaming_runtime_transfer_ChannelID */ #ifndef _Included_org_ray_streaming_runtime_transfer_ChannelID #define _Included_org_ray_streaming_runtime_transfer_ChannelID #ifdef __cplusplus extern "C" { #endif #undef org_ray_...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.cc
C++
#include "org_ray_streaming_runtime_transfer_DataReader.h" #include <cstdlib> #include "data_reader.h" #include "runtime_context.h" #include "streaming_jni_common.h" using namespace ray; using namespace ray::streaming; JNIEXPORT jlong JNICALL Java_org_ray_streaming_runtime_transfer_DataReader_createDataReaderNative( ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataReader.h
C/C++ Header
/* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_ray_streaming_runtime_transfer_DataReader */ #ifndef _Included_org_ray_streaming_runtime_transfer_DataReader #define _Included_org_ray_streaming_runtime_transfer_DataReader #ifdef __cplusplus extern "C" { #endif /* * Class:...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.cc
C++
#include "org_ray_streaming_runtime_transfer_DataWriter.h" #include "config/streaming_config.h" #include "data_writer.h" #include "streaming_jni_common.h" using namespace ray::streaming; JNIEXPORT jlong JNICALL Java_org_ray_streaming_runtime_transfer_DataWriter_createWriterNative( JNIEnv *env, jclass, jobjectArra...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/org_ray_streaming_runtime_transfer_DataWriter.h
C/C++ Header
/* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_ray_streaming_runtime_transfer_DataWriter */ #ifndef _Included_org_ray_streaming_runtime_transfer_DataWriter #define _Included_org_ray_streaming_runtime_transfer_DataWriter #ifdef __cplusplus extern "C" { #endif /* * Class:...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.cc
C++
#include "org_ray_streaming_runtime_transfer_TransferHandler.h" #include "queue/queue_client.h" #include "streaming_jni_common.h" using namespace ray::streaming; static std::shared_ptr<ray::LocalMemoryBuffer> JByteArrayToBuffer(JNIEnv *env, jbyteArray ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/org_ray_streaming_runtime_transfer_TransferHandler.h
C/C++ Header
/* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_ray_streaming_runtime_transfer_TransferHandler */ #ifndef _Included_org_ray_streaming_runtime_transfer_TransferHandler #define _Included_org_ray_streaming_runtime_transfer_TransferHandler #ifdef __cplusplus extern "C" { #end...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/streaming_jni_common.cc
C++
#include "streaming_jni_common.h" std::vector<ray::ObjectID> jarray_to_object_id_vec(JNIEnv *env, jobjectArray jarr) { int stringCount = env->GetArrayLength(jarr); std::vector<ray::ObjectID> object_id_vec; for (int i = 0; i < stringCount; i++) { auto jstr = (jbyteArray) (env->GetObjectArrayElement(jarr, i));...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/lib/java/streaming_jni_common.h
C/C++ Header
#ifndef RAY_STREAMING_JNI_COMMON_H #define RAY_STREAMING_JNI_COMMON_H #include <jni.h> #include <string> #include "ray/core_worker/common.h" #include "util/streaming_logging.h" class UniqueIdFromJByteArray { private: JNIEnv *_env; jbyteArray _bytes; jbyte *b; public: ray::ObjectID PID; UniqueIdFromJByte...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/message/message.cc
C++
#include <utility> #include <cstring> #include <string> #include "message.h" #include "ray/common/status.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { StreamingMessage::StreamingMessage(std::shared_ptr<uint8_t> &data, uint32_t data_size, uint64_t seq...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/message/message.h
C/C++ Header
#ifndef RAY_MESSAGE_H #define RAY_MESSAGE_H #include <memory> namespace ray { namespace streaming { class StreamingMessage; typedef std::shared_ptr<StreamingMessage> StreamingMessagePtr; enum class StreamingMessageType : uint32_t { Barrier = 1, Message = 2, MIN = Barrier, MAX = Message }; constexpr uint32...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/message/message_bundle.cc
C++
#include <cstring> #include <string> #include "ray/common/status.h" #include "config/streaming_config.h" #include "message_bundle.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { StreamingMessageBundle::StreamingMessageBundle(uint64_t last_offset_seq_id, ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/message/message_bundle.h
C/C++ Header
#ifndef RAY_MESSAGE_BUNDLE_H #define RAY_MESSAGE_BUNDLE_H #include <ctime> #include <list> #include <numeric> #include "message.h" namespace ray { namespace streaming { enum class StreamingMessageBundleType : uint32_t { Empty = 1, Barrier = 2, Bundle = 3, MIN = Empty, MAX = Bundle }; class StreamingMessa...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/message/priority_queue.h
C/C++ Header
#ifndef RAY_PRIORITY_QUEUE_H #define RAY_PRIORITY_QUEUE_H #include <algorithm> #include <memory> #include <vector> #include "util/streaming_logging.h" namespace ray { namespace streaming { template <class T, class C> class PriorityQueue { private: std::vector<T> merge_vec_; C comparator_; public: PriorityQ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/protobuf/streaming.proto
Protocol Buffers
syntax = "proto3"; package ray.streaming.proto; option java_package = "org.ray.streaming.runtime.generated"; enum OperatorType { UNKNOWN = 0; TRANSFORM = 1; SOURCE = 2; SINK = 3; } // all string in this message is ASCII string message StreamingConfig { string job_name = 1; string task_job_id = 2; stri...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/protobuf/streaming_queue.proto
Protocol Buffers
syntax = "proto3"; package ray.streaming.queue.protobuf; enum StreamingQueueMessageType { StreamingQueueDataMsgType = 0; StreamingQueueCheckMsgType = 1; StreamingQueueCheckRspMsgType = 2; StreamingQueueNotificationMsgType = 3; StreamingQueueTestInitMsgType = 4; StreamingQueueTestCheckStatusRspMsgType = 5;...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/message.cc
C++
#include "message.h" namespace ray { namespace streaming { const uint32_t Message::MagicNum = 0xBABA0510; std::unique_ptr<LocalMemoryBuffer> Message::ToBytes() { uint8_t *bytes = nullptr; std::string pboutput; ToProtobuf(&pboutput); int64_t fbs_length = pboutput.length(); queue::protobuf::StreamingQueueMe...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/message.h
C/C++ Header
#ifndef _STREAMING_QUEUE_MESSAGE_H_ #define _STREAMING_QUEUE_MESSAGE_H_ #include "protobuf/streaming_queue.pb.h" #include "ray/common/buffer.h" #include "ray/common/id.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { /// Base class of all message classes. /// All payloads transferred thro...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/queue.cc
C++
#include "queue.h" #include <chrono> #include <thread> #include "queue_handler.h" #include "util/streaming_util.h" namespace ray { namespace streaming { bool Queue::Push(QueueItem item) { std::unique_lock<std::mutex> lock(mutex_); if (max_data_size_ < item.DataSize() + data_size_) return false; buffer_queue_.p...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/queue.h
C/C++ Header
#ifndef _STREAMING_QUEUE_H_ #define _STREAMING_QUEUE_H_ #include <iterator> #include <list> #include <vector> #include "ray/common/id.h" #include "ray/util/util.h" #include "queue_item.h" #include "transport.h" #include "util/streaming_logging.h" #include "utils.h" namespace ray { namespace streaming { using ray::O...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/queue_client.cc
C++
#include "queue_client.h" namespace ray { namespace streaming { void WriterClient::OnWriterMessage(std::shared_ptr<LocalMemoryBuffer> buffer) { upstream_handler_->DispatchMessageAsync(buffer); } std::shared_ptr<LocalMemoryBuffer> WriterClient::OnWriterMessageSync( std::shared_ptr<LocalMemoryBuffer> buffer) { ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/queue_client.h
C/C++ Header
#ifndef _STREAMING_QUEUE_CLIENT_H_ #define _STREAMING_QUEUE_CLIENT_H_ #include "queue_handler.h" #include "transport.h" namespace ray { namespace streaming { /// The interface of the streaming queue for DataReader. /// A ReaderClient should be created before DataReader created in Cython/Jni, and hold by /// Jobworker...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/queue_handler.cc
C++
#include "queue_handler.h" #include "util/streaming_util.h" #include "utils.h" namespace ray { namespace streaming { constexpr uint64_t COMMON_SYNC_CALL_TIMEOUTT_MS = 5 * 1000; std::shared_ptr<UpstreamQueueMessageHandler> UpstreamQueueMessageHandler::upstream_handler_ = nullptr; std::shared_ptr<DownstreamQueueMe...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/queue_handler.h
C/C++ Header
#ifndef _QUEUE_SERVICE_H_ #define _QUEUE_SERVICE_H_ #include <boost/asio.hpp> #include <boost/bind.hpp> #include <boost/thread.hpp> #include <thread> #include "queue.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { /// Base class of UpstreamQueueMessageHandler and DownstreamQueueMessageH...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/queue_item.h
C/C++ Header
#ifndef _STREAMING_QUEUE_ITEM_H_ #define _STREAMING_QUEUE_ITEM_H_ #include <iterator> #include <list> #include <thread> #include <vector> #include "ray/common/id.h" #include "message.h" #include "message/message_bundle.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { using ray::ObjectID;...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/transport.cc
C++
#include "transport.h" #include "utils.h" namespace ray { namespace streaming { static constexpr int TASK_OPTION_RETURN_NUM_0 = 0; static constexpr int TASK_OPTION_RETURN_NUM_1 = 1; void Transport::SendInternal(std::shared_ptr<LocalMemoryBuffer> buffer, RayFunction &function, int return_...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/transport.h
C/C++ Header
#ifndef _STREAMING_QUEUE_TRANSPORT_H_ #define _STREAMING_QUEUE_TRANSPORT_H_ #include "ray/common/id.h" #include "ray/core_worker/core_worker.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { /// Transport is the transfer endpoint to a specific actor, buffers can be sent to peer /// through...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/queue/utils.h
C/C++ Header
#ifndef _STREAMING_QUEUE_UTILS_H_ #define _STREAMING_QUEUE_UTILS_H_ #include <chrono> #include <future> #include <thread> #include "ray/util/util.h" namespace ray { namespace streaming { /// Helper class encapulate std::future to help multithread async wait. class PromiseWrapper { public: Status Wait() { std::...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/ring_buffer.cc
C++
#include "ring_buffer.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { StreamingRingBuffer::StreamingRingBuffer(size_t buf_size, StreamingRingBufferType buffer_type) { switch (buffer_type) { case StreamingRingBufferType::SPSC: message_buffer...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/ring_buffer.h
C/C++ Header
#ifndef RAY_RING_BUFFER_H #define RAY_RING_BUFFER_H #include <atomic> #include <boost/circular_buffer.hpp> #include <boost/thread/locks.hpp> #include <boost/thread/shared_mutex.hpp> #include <condition_variable> #include <memory> #include <mutex> #include <queue> #include "message/message.h" #include "ray/common/stat...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/runtime_context.cc
C++
#include "ray/common/id.h" #include "ray/protobuf/common.pb.h" #include "ray/util/util.h" #include "runtime_context.h" #include "util/streaming_logging.h" namespace ray { namespace streaming { void RuntimeContext::SetConfig(const StreamingConfig &streaming_config) { STREAMING_CHECK(runtime_status_ == RuntimeStatus...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta