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 python3 | |
import os | |
import sys | |
import argparse | |
import zipfile | |
import shutil | |
import tempfile | |
import xml.etree.ElementTree as ET | |
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
function ff() { | |
if [ -z $1 ] | |
then | |
search_dir="." | |
else | |
search_dir="$1" | |
fi | |
ag --nobreak --noheading . $search_dir | \ | |
fzf --preview='cat "$(echo {} | cut -d: -f1)"' --preview-window=right | |
} |
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
def benchmark_pandas(): | |
import timerit | |
import pandas as pd | |
import numpy as np | |
column_data = { | |
key: np.random.rand(1000) | |
for key in map(chr, range(ord('a'), ord('z'))) | |
} | |
data_frame = pd.DataFrame(column_data) |
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
from time import perf_counter | |
from cuml import using_output_type | |
from cuml.datasets import make_classification | |
from cuml.ensemble import RandomForestClassifier | |
from cuml.metrics import accuracy_score | |
with using_output_type('cupy'): | |
data, labels = make_classification( | |
n_samples=int(1e5), |
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 cupy | |
from cupyx.time import repeat | |
cupy.random.seed(0) | |
for size in (5, 50, 500, 5000, 50000, int(5e6)): | |
a = cupy.random.rand(size) | |
q = cupy.linspace(0, 100, 3) | |
def f(): |
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
compute-sanitizer pytest python/cuml/test | |
========= COMPUTE-SANITIZER | |
============================= test session starts ============================== | |
platform linux -- Python 3.8.6, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 | |
rapids_pytest_benchmark: 0.0.13 | |
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000) | |
rootdir: /home/whicks/proj_cuml/cuml/python, configfile: pytest.ini | |
plugins: hypothesis-6.1.1, cov-2.11.1, rapids-pytest-benchmark-0.0.13, benchmark-3.2.3, timeout-1.4.2, repeat-0.8.0, forked-1.3.0, asyncio-0.12.0, xdist-2.2.0 | |
collected 27716 items |
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
tree | |
version=v3 | |
num_class=1 | |
num_tree_per_iteration=1 | |
label_index=0 | |
max_feature_idx=31 | |
objective=binary sigmoid:1 | |
feature_names=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
feature_infos=[-6.5546088218688965:6.2278804779052734] -1:1:0 [-4.965395450592041:6.5972399711608887] [-4.6478652954101562:6.5585684776306152] [-8.2879343032836914:7.7419576644897461] [-6.8546819686889648:7.0196652412414551] [-8.7973241806030273:5.5609464645385742] [-6.5725240707397461:7.2596492767333984] -1:0:1 [-6.8401269912719727:6.9245181083679199] [-11.817563056945801:12.412569046020508] [-14.371319770812988:12.11441707611084] [-2.6720693111419678:3.1814792156219482] [-3.1954507827758789:3.3344674110412598] [-3.2284896373748779:3.2031958103179932] [-4.0048222541809082:3.3795340061187744] [-3.2715401649475098:2.9391093254089355] [-3.5124735832214355:2.8368351459503174] [-2.8929731845855713:3.4158065319061279] [-3.7133853435516357:3.583622932434082] [-2.697335958480835:3.3189976215362549] [-2.9512 |
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
import cupy as cp | |
import os | |
import numpy as np | |
import treelite | |
import treelite_runtime | |
import xgboost as xgb | |
from time import perf_counter | |
from cuml.common.device_selection import using_device_type | |
from cuml.experimental import ForestInference |
OlderNewer