Hypernets experiment visualization
Project description
hboard
This project provides a web based visualization tool for experiment information. In general, Hypernets writes the experiment events into a text file. This tool could monitor the file and make these events visible.
Installation
Install with pip
pip install hboard
Install with conda
conda install -c conda-forge hboard
Install with source code
Create a frontend project after installing the front-end library hboard-frontend:
- Create the required software environment:
- Besides, this project requires the package manager
yarn
and the module bundlerwebpack
. Install them by the following command:
npm install -g webpack webpack-cli yarn
Clone the project codes:
git clone https://github.com/DataCanvasIO/HyperBoard.git
Build the project:
cd hboard/js
# build frontend
yarn
yarn build
rm -rf ../hboard/assets/
cp -r build/ ../hboard/assets/
# install
cd ..
python setup.py install
Example of hboard
The folllowing steps shows how to implement the hboard:
- Create an empty event file to store the experiment states
touch events.txt
- Create a web server to monitor the event file
from hboard.app import WebApp
webapp = WebApp("events.txt")
webapp.start()
The web server outputs logs as:
02-24 20:45:58 I hboard.app.py 77 - experiment visualization http server is running at: http://0.0.0.0:8888
The web can be accessed via http://localhost:8888。
- Add detailed experiment events to the file 'event.txt' by command:
echo '{"type": "experimentStart", "payload": {"task": "binary", "datasets": [{"kind": "Train", "task": "binary", "shape": [904, 17], "memory": 123072}], "steps": [{"index": 0, "name": "data_clean", "type": "DataCleanStep", "status": "wait", "configuration": {"cv": true, "data_cleaner_args": {"nan_chars": null, "correct_object_dtype": true, "drop_constant_columns": true, "drop_label_nan_rows": true, "drop_idness_columns": true, "drop_columns": null, "reserve_columns": null, "drop_duplicated_columns": false, "reduce_mem_usage": false, "int_convert_to": "float"}, "name": "data_clean", "train_test_split_strategy": null}, "extension": {}, "start_datetime": null, "end_datetime": null}, {"index": 1, "name": "space_searching", "type": "SpaceSearchStep", "status": "wait", "configuration": {"cv": true, "name": "space_searching", "num_folds": 3, "earlyStopping": {"enable": true, "exceptedReward": null, "maxNoImprovedTrials": 10, "timeLimit": 3600, "mode": "max"}}, "extension": {}, "start_datetime": null, "end_datetime": null}, {"index": 2, "name": "final_ensemble", "type": "EnsembleStep", "status": "wait", "configuration": {"ensemble_size": 20, "name": "final_ensemble", "scorer": "make_scorer(accuracy_score)"}, "extension": {}, "start_datetime": null, "end_datetime": null}], "evaluation_metric": null, "confusion_matrix": null, "resource_usage": null, "prediction_stats": null}}' >> events.txt
Now the web initialization is finished. The Hypernets experiment writes the events by callback. The web will update the lastest experiment states automatically.
Visualization when the experiment is finished
Once hboard
installed, use the command 'hboard' to visualize the finished experiment.
hboard -h
usage: hboard [-h] {server} ...
hboard command is used to visualize the experiment
positional arguments:
{server}
server start webserver
optional arguments:
-h, --help show this help message and exit
See example below:
- Clone the codes
git clone https://github.com/DataCanvasIO/HyperBoard.git
- Start the web server and load the experiment data
cd HyperBoard
hboard server --event-file=hboard/hboard/tests/events_example.json
View the experiment dashboard via http://localhost:8888.
Related project
Currently, HyperGBM has integrated this tool. The HyperGBM experiment could callback the web visualization function and display the experiment dashboard. Please refer to Experiment Visualization。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file hboard-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: hboard-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 410c116831ba42ddc0d151c7574b67ef271b66f554bd84d5d41761bc5b849b6f |
|
MD5 | 6f40ce0ca698d5cb8bff29c0916f6c1e |
|
BLAKE2b-256 | 0cb8f356a0b4edeea18d2a9147993f3e7d1e3383205d77542d2a2b8f7524d630 |