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
image: python:3.8.3 | |
# pipeline stages definitions | |
test: &test | |
step: | |
name: test | |
caches: | |
- pip | |
script: | |
- python --version |
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 | |
import pytest | |
try: | |
from.temp_env_var import TEMP_ENV_VARS, ENV_VARS_TO_SUSPEND | |
except ImportError: | |
TEMP_ENV_VARS = {} | |
ENV_VARS_TO_SUSPEND = [] | |
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 | |
# --- script documentation | |
# recieves two arrays as input using the length prefix convention. See: | |
# https://stackoverflow.com/questions/43686878/pass-multiple-arrays-as-arguments-to-a-bash-script | |
# add mandatory packages here | |
# packages+=("pandas") | |
echo ">>> conda_envs: ${conda_envs[@]}" |
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
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
sudo apt-get install build-essential cmake | |
sudo apt-get install python-dev python3-dev | |
#Optional: so vim can be uninstalled again via `dpkg -r vim` | |
sudo apt-get install checkinstall | |
sudo rm -rf /usr/local/share/vim /usr/bin/vim |
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 pandas as pd; import deepchecks; | |
from deepchecks.datasets.classification.phishing import load_data | |
df = load_data(data_format='dataframe', as_train_test=False) | |
df.head(5) |
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 deepchecks.suites import single_dataset_integrity | |
integ_suite = single_dataset_integrity() | |
integ_suite.run(test_dataset=df) |
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 deepchecks.datasets.classification.phishing import get_url_preprocessor | |
pipeline = get_url_preprocessor() | |
train_df = pipeline.fit_transform(raw_train_df) | |
train_X = train_df.drop('target', axis=1) | |
train_y = train_df['target'] | |
test_df = pipeline.transform(raw_test_df) | |
test_X = test_df.drop('target', axis=1) | |
test_y = test_df['target'] |
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 deepchecks.suites import train_test_validation | |
vsuite = train_test_validation() | |
ds_train = deepchecks.Dataset(df=train_X, label=train_y, set_datetime_from_dataframe_index=True, cat_features=[]) | |
ds_test = deepchecks.Dataset(df=test_X, label=test_y, set_datetime_from_dataframe_index=True, cat_features=[]) | |
vsuite.run(model=logreg, train_dataset=ds_train, test_dataset=ds_test) |
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 deepchecks.suites import model_evaluation | |
msuite = model_evaluation() | |
msuite.run(model=logreg, train_dataset=ds_train, test_dataset=ds_test) |
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 sklearn.tree import DecisionTreeClassifier | |
model = DecisionTreeClassifier(criterion='entropy', splitter='random', random_state=SEED) | |
model.fit(train_X, train_y) | |
msuite.run(model=model, train_dataset=ds_train, test_dataset=ds_test) |