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 json | |
import random | |
import time | |
import os | |
from spell.serving import BasePredictor | |
import spell.serving.metrics as m | |
class Predictor(BasePredictor): |
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 torch | |
from torch.utils.data import Dataset, DataLoader | |
import torchvision | |
import pandas as pd | |
from PIL import Image | |
import time | |
import argparse | |
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
module go-azure | |
go 1.16 | |
require ( | |
github.com/Azure/azure-sdk-for-go v55.4.0+incompatible // indirect | |
github.com/Azure/go-autorest/autorest v0.11.19 // indirect | |
github.com/Azure/go-autorest/autorest/azure/auth v0.5.7 // indirect | |
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect | |
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
+ [[ ! -d /tmp/tvm ]] | |
+ git clone --recursive https://github.com/apache/tvm /tmp/tvm | |
Cloning into '/tmp/tvm'... | |
remote: Enumerating objects: 85, done. | |
remote: Counting objects: 100% (85/85), done. | |
remote: Compressing objects: 100% (76/76), done. | |
remote: Total 95489 (delta 26), reused 8 (delta 6), pack-reused 95404 | |
Receiving objects: 100% (95489/95489), 36.67 MiB | 33.38 MiB/s, done. | |
Resolving deltas: 100% (69864/69864), done. | |
Submodule 'dlpack' (https://github.com/dmlc/dlpack) registered for path '3rdparty/dlpack' |
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
#!/bin/bash | |
set -ex | |
# https://tvm.apache.org/docs/install/from_source.html#install-from-source | |
if [[ ! -d "/tmp/tvm" ]]; then | |
git clone --recursive https://github.com/apache/tvm /tmp/tvm | |
fi | |
apt-get update && \ | |
apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev \ | |
build-essential cmake libedit-dev libxml2-dev | |
if [[ ! -d "/tmp/tvm/build" ]]; then |
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
PandaModel( | |
(enc): Sequential( | |
(0): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False) | |
(1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) | |
(2): ReLU(inplace=True) | |
(3): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False) | |
(4): Sequential( | |
(0): Bottleneck( | |
(conv1): Conv2d(64, 128, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) |
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 os | |
from pathlib import Path | |
import torch | |
from torchvision.datasets import ImageFolder | |
from torch.utils.data import Dataset, DataLoader | |
from torch import nn | |
from torchvision import transforms | |
import torch.optim as optim | |
import torch.quantization |
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 click | |
import subprocess | |
import os | |
@click.group() | |
def cli(): | |
pass | |
@click.command(name="connect", short_help="Shell out to psql.") |
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
if __name__ == "__main__": | |
from distributed import Client, LocalCluster | |
import dask.dataframe as df | |
import dask.array as da | |
cluster = LocalCluster() | |
client = Client(cluster) | |
matches = da.from_npy_stack("/spell/data/") | |
matches = df.from_array(matches) |
NewerOlder