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
pip install giskard==2.0.0b2 |
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
""" | |
Summary: Tests if the model prediction is invariant when the feature values are perturbed | |
Description: Test if the predicted classification label remains the same after | |
feature values perturbation.The test is passed when the percentage of unchanged | |
rows is higher than the threshold | |
Args: | |
df(GiskardDataset): |
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
giskard worker start -h <giskard server ip address> |
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
arch -x86_64 zsh | |
./gradlew build --parallel | |
./gradlew -Pprod bootJar | |
java -jar giskard-server/build/libs/giskard-server.jar | |
cd giskard-ml-worker && PYTHONPATH=generated .venv/bin/python main.py | |
cd giskard-frontend && npm run 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
git clone https://github.com/Giskard-AI/giskard.git | |
cd giskard | |
docker-compose up -d |
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 keras.layers import Input, Dense, LSTM, Reshape | |
from keras.models import Model | |
# Define the keras architecture of your model in 'build_model' and return it. Compilation must be done in 'compile_model'. | |
# input_shapes - dictionary of shapes per input as defined in features handling | |
# n_classes - For classification, number of target classes | |
def build_model(input_shapes, n_classes=None): | |
# This input will receive all the preprocessed features | |
window_size = 30 |
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
# -------------------------------------------------------------------------------- NOTEBOOK-CELL: CODE | |
# -*- coding: utf-8 -*- | |
import dataiku | |
import pandas as pd, numpy as np | |
import os | |
# Read recipe inputs | |
positive_python = dataiku.Dataset("positive_python") | |
df = positive_python.get_dataframe() | |
# Write recipe outputs |
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
# Parameters | |
number_of_groups = 5 | |
number_of_users_per_group = 3 | |
generic_password = "password4Training!!" | |
analysis_id, mltask_id = u'bOkH96fi', u'E7bXC2fR' | |
saved_model_id="sXGr0kU2" | |
# Group creation | |
import dataiku |
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
# LIBRARY LOADING | |
from dataiku.scenario import Trigger | |
import dataiku | |
import pandas as pd | |
from dataiku.core.sql import SQLExecutor2 | |
import json | |
# USER INPUT - CHANGE THE DICTIONARY BELOW | |
## This should be a dictionary of KEY: VALUE | |
## with KEY being names of datasets you want to monitor |
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
# -*- coding: utf-8 -*- | |
# Author = COMBESSIE, Alexandre (Dataiku) | |
## How to deploy a DSS API package from Design or Automation to API node | |
## This script is designed to be run in a DSS Design or Automation node | |
## It can run on an external system with a Dataiku API client token | |
## For details on how to query the deployed API endpoint, | |
## check https://doc.dataiku.com/dss/api/4.1/apinode-user/ | |
## Note that for Python/R function endpoints the URL should end by /run instead of /predict | |
# LIBRARIES |
NewerOlder