-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EDA visualization panel app and CLI tool to launch
Add a CLI tool to launch an EDA panel app with a scheduler.json file path as an argument. This will launch a new window with some basic plots Also add a log statement about optimization.csv
- Loading branch information
1 parent
b41c48f
commit cdbc7e4
Showing
8 changed files
with
150 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
""" | ||
BOA plotting CLI module | ||
You can launch a basic EDA plot view | ||
of your optimization with:: | ||
python -m boa.plot path/to/scheduler.json | ||
""" | ||
|
||
|
||
import pathlib | ||
|
||
import click | ||
import panel as pn | ||
|
||
from boa.plotting import app_view | ||
|
||
|
||
@click.command() | ||
@click.option( | ||
"-sp", | ||
"--scheduler-path", | ||
type=click.Path(), | ||
default="", | ||
help="Path to scheduler json file.", | ||
) | ||
def main(scheduler_path): | ||
template = app_view(scheduler=scheduler_path) | ||
pn.serve({pathlib.Path(__file__).name: template}) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "8f0e472a-a63a-4b91-836f-f0ac12f6bfce", | ||
"metadata": {}, | ||
"source": [ | ||
"# BOA Provided Visualizations" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "038f4c1b-3a42-4686-8433-2f803d03cb85", | ||
"metadata": { | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"## Our scheduler.json\n", | ||
"\n", | ||
"From our run in R in [Running an R Script with BOA](1run_r_streamlined.ipynb), we saved our scheduler.json file. In the same directory BOA also saves an optimization.csv file with the parameters and objective of every trial, as well as a log file.\n", | ||
"\n", | ||
"BOA gives us some light EDA tools automatically. You can do them automatically from the command line, or if you would like to dive into with more control, see our Python loading and visualization tutorials for more details.\n", | ||
"\n", | ||
"From the command line, we can issue\n", | ||
"\n", | ||
"```python\n", | ||
"python -m boa.plot --scheduler-path path/to/scheduler.json\n", | ||
"\n", | ||
"or\n", | ||
"\n", | ||
"python -m boa.plot -sp path/to/scheduler.json\n", | ||
"```\n", | ||
"\n", | ||
"```{attention} \n", | ||
"Pictures of the rendered Visualization app will be added in the Future\n", | ||
"```" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "fa16f066-856a-4d69-9237-fed71c325724", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python [conda env:boa-dev]", | ||
"language": "python", | ||
"name": "conda-env-boa-dev-py" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.12" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Examples | |
|
||
example_py_run | ||
1run_r_streamlined | ||
2EDA_from_r_run | ||
|
||
|
||
.. toctree:: | ||
|
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
cdbc7e4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report