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 ray | |
from typing import List, Union, AsyncGenerator | |
from vllm import EngineArgs, LLMEngine | |
from vllm.engine.arg_utils import AsyncEngineArgs | |
from vllm.engine.async_llm_engine import AsyncLLMEngine | |
from vllm.entrypoints.openai.protocol import ( | |
ChatCompletionRequest, | |
ChatCompletionResponse, | |
ChatCompletionToolsParam, | |
FunctionDefinition, |
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
# frozen_string_literal: true | |
module ActiveAdmin | |
class BatchTableFor < ActiveAdmin::Component | |
class SelectableIndexTable < ActiveAdmin::Views::TableFor | |
def selectable_column | |
column resource_selection_toggle_cell, class: "col-selectable", sortable: false do |resource| | |
resource_selection_cell resource | |
end | |
end |
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
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'json' | |
require 'csv' | |
uri = URI('https://raw.githubusercontent.com/db1000n-coordinators/LoadTestConfig/main/config.v0.7.json') | |
response = Net::HTTP.get(uri) | |
data = JSON.parse(response) |
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
docker-machine create \ | |
--driver=generic \ | |
--generic-ip-address=IP_ADDRESS \ | |
--generic-ssh-user=USERNAME \ | |
--generic-ssh-key=PATH_TO_SSH_KEY \ | |
--generic-ssh-port=PORT \ | |
MACHINE_NAME |
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
# frozen_string_literal: true | |
module WorkersBalancer | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def balanced_perform_later(collection_ids) | |
collection_ids.in_groups(workers_count).each do |ids_group| |
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
require 'active_support/concern' | |
module Sidekiq::Cancelable | |
extend ActiveSupport::Concern | |
included do | |
include Redis::Objects | |
attr_accessor :id | |
value :stored_jid |
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 file is copied to spec/ when you run 'rails generate rspec:install' | |
ENV["RAILS_ENV"] = 'test' | |
require 'simplecov' | |
SimpleCov.start 'rails' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'fakeredis/rspec' | |
require 'sidekiq/testing' |