This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from ray import serve | |
@serve.deployment | |
class MessageConsumer: | |
def __init__(self, topic: str): | |
asyncio.get_running_loop().create_task( | |
self.poll_for_messages(topic) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pipeline.step | |
def preprocess(_input: str) -> PreprocessOutput: | |
pass | |
@pipeline.step(num_replicas=10, num_gpus=1) | |
class Model1: | |
def __call__(self, _input: PreprocessOutput) -> Model1Output: | |
pass | |
@pipeline.step(num_replicas=5, num_cpus=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dash | |
from dash import dcc, html | |
from dash.dependencies import Input, Output | |
import pandas as pd | |
import plotly.graph_objs as obj | |
import uvicorn as uvicorn | |
from fastapi import FastAPI | |
from starlette.middleware.wsgi import WSGIMiddleware | |
import ray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dash | |
from dash import dcc, html | |
from dash.dependencies import Input, Output | |
import pandas as pd | |
import plotly.graph_objs as obj | |
import uvicorn as uvicorn | |
from fastapi import FastAPI | |
from starlette.middleware.wsgi import WSGIMiddleware | |
app = dash.Dash(__name__, requests_pathname_prefix="/dash/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ray.init() | |
@ray.remote | |
class Controller: | |
def start_me_an_actor(self, cls): | |
# Start an actor on behalf of the caller. | |
ray.remote(cls).remote() | |
Controller.options(name="controller", lifetime="detached").remote() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("train_s3_urls") | |
parser.add_argument("inference_s3_urls") | |
parser.add_argument("output_path") | |
import ray | |
from ray import serve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from asyncio.futures import Future | |
from collections import defaultdict | |
from typing import Dict, Any, List, Optional, Set, Tuple | |
import ray | |
import ray.cloudpickle as pickle | |
from ray.actor import ActorHandle | |
from ray.serve.async_goal_manager import AsyncGoalManager | |
from ray.serve.backend_worker import create_backend_replica |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import random | |
import time | |
from multiprocessing.pool import Pool | |
NUM_SAMPLES = 100000000 | |
NUM_PROCESSES = 8 | |
def take_sample(index): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import numpy as np | |
import ray | |
ray.init(log_to_driver=False) | |
@ray.remote | |
class Actor: | |
def __init__(self, next_actor, by_ref): |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This time, a new baby is on the way, and it's a girl. Wrapped together with the standard conflict between mother and father, Mikey engages in a bit of sibling rivalry with his new sister. | |
Excited with the arrival of their baby girl, Julie, the happy couple of James, the cab driver, and Molly, the accountant, will have to prepare young Mikey for the role of the big brother. Against the backdrop of rigorous potty training, heated arguments, and, first and foremost, healthy sibling rivalry, both adults and children alike will learn that family is above all. Will Julie follow in Mikey's footsteps? | |
Mollie and James are together and raising a family, which now consists of an older Mikey and his baby sister, Julie. Tension between the siblings arises, and as well with Mollie and James when Mollie's brother Stuart moves in. Mikey is also learning how to use the toilet for the first time. | |
Excited with the arrival of their baby girl, Julie, the happy couple of James, the cab driver, and Molly, the accountant, will have |
NewerOlder