Last Updated: 2021-07-14
QuSandbox is a platform that helps users deploy and audit machine learning models, experiments and results.
In this codelab, you're going to use the QuSandbox to review an audit example of a machine learning pipeline. Your will need to:
https://demo.qusandbox.com/auth/register-page, go to the register page and input your name and a valid email, with a complex enough password(contains capital character, symbol, number, and at least 8 characters long). Ask info@qusandbox.com for the registration code.
get the code from the email (If not received, please check spam, advertisement, and promotion), and input the code to activate your account.
In the QuSandbox, every Algorithmic audit will be structured as Projects. In each project, you can have multiple experiments. Follow the instructions below to create your project.
In addition to a standalone report board, each card will have a checkbox for report. You can generate reports by using the templates inherited inside. We have already chosen the template for you, but once you want to create your own template. Firstly, click Report under the QuToolBox. Then follow the steps of the Browse Report Template listed below.
QuAudit is a tool for calling the report generation functions of QuSandbox by code. View the package on github.
Run on cloud
For quick access, you can click the buttons below to go through our tutorials in notebook format on Google Colab. For example, Sample Basic Report, Sample Score Report, Sample Report with Notes, Sample AIF360 Report
Run it locally
Just install the package using pip
# Install via pip
pip install git+https://github.com/qu-user-2/QUAudit.git
Import the package
from qu_audit.qu_audit import *
Load the template. For more templates, browse on package's github, package's document page, or QuSandbox directly.
# browse the sample template
template_id = "7acd5c69079946b199c8bab692512f27"
MyTemplateReader = TemplateReader(template_id)
MyTemplateReader.load()
Get sample input of the selected template, then edit it to get the input for your own report.
# get sample input to edit
sample_input = MyTemplateReader.get_sample_input()
# Edit the sample input
sample_input.set_value('Environment', 'My first try of QuAudit locally')
Then generate the report using the sample input generated above.
MyReportGenerator = ReportGenerator(name="My first try of QuAudit", version="1.0")
MyReportGenerator.load(sample_input)
html = MyReportGenerator.generate()
If you are using a jupyter notebook environment, you can use our helper function to view the report. If you run all the code as a python script, you could save the report somewhere and open it in the browser.
# show report in notebook
show_report(html)
# save the report to file
MyReportGenerator.save()
Advanced Functions
Besides the basic report generation function, the QuAudit package also supports other high level functionalities:
For more specific introductions, please visit the package documentation directly.
API Reference
For more specific API reference of the package, please visit the package documentation directly.
There is a tool called QU Template Catalog inside the report category of QuToolBox, In here you could view and create templates that could be used in the auditing process using survey.js.
Inside every functional card, you can see there is a REPORTS option. You can generate the corresponding report using the template we have already given or you can use your self-defined template to generate the report. The template example is shown below. You can put any keyword or you can put nothing if you like below.
Notice:
There is an ADD NOTE button on the bottom of the REPORTS. You can not add the note without creating it in advance. If you are trying to add a note, please click the NOTES option beside the REPORTS first, then create a note. You should find the note you just created under the CHOOSE NOTE and then add the note to your report.
There are four options that will show up once you click the SUBMIT button.