guidepost 0.2.7__tar.gz → 0.2.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.2
2
+ Name: guidepost
3
+ Version: 0.2.9
4
+ Summary: Guidepost. An overview visualization for understanding supercomputer queue data.
5
+ Home-page: https://github.com/cscully-allison/guidepost
6
+ Author: Connor Scully-Allison
7
+ Author-email: cscullyallison@sci.utah.edu
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: numpy
15
+ Requires-Dist: pandas
16
+ Requires-Dist: scikit-learn
17
+ Requires-Dist: anywidget
18
+ Requires-Dist: traitlets
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: requires-dist
26
+ Dynamic: requires-python
27
+ Dynamic: summary
28
+
29
+ # Guidepost
30
+
31
+ Guidepost is a Python library designed for seamless integration into Jupyter notebooks to visualize High Performance Computing (HPC) job data. It simplifies the process of understanding HPC workloads by providing a single, interactive visualization that offers an intuitive overview of job performance, resource usage, and other critical metrics.
32
+
33
+ ---
34
+
35
+ ## Features
36
+
37
+ - **Jupyter Notebook Integration**: Designed for your existing workflow. Load and interact with the visualization directly in your Jupyter environment.
38
+ - **HPC Job Data Insights**: Visualize key metrics, including job runtimes, resource usage, and queue performance.
39
+ - **Interactive Exploration**: Export selections of specific jobs or groups of jobs for deeper analysis.
40
+ - **Lightweight and Easy to Use**: Focused on simplicity and efficiency for HPC users.
41
+
42
+ ---
43
+
44
+ ## Installation
45
+
46
+ Guidepost is available on PyPI. You can install it using pip:
47
+
48
+ ```bash
49
+ pip install guidepost
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Quick Start
55
+
56
+ ### 1. Import and Initialize Guidepost
57
+
58
+ ```python
59
+ from guidepost import Guidepost
60
+ gp = Guidepost()
61
+ ```
62
+
63
+ ### 2. Load Your Data
64
+
65
+
66
+ ```python
67
+ import pandas as pd
68
+ jobs_data = pd.read_parquet("data/jobs_data.parquet")
69
+ gp.load_data(jobs_data)
70
+ ```
71
+
72
+ Guidepost supports input data in a Pandas DataFrame format.
73
+
74
+ At least three numerical and 2 categorical columns are required. Datetime columns are also supported for encoding on the x axis.
75
+
76
+ Here is a sample table containg jobs-related data from a supercomputer scheduling system:
77
+
78
+ | job_id |start_time | queue_wait | nodes_requested | partition | status | user |
79
+ |--------|-----------------------------|----------------|-----------------|-----------|------------|--------|
80
+ | 12345 | 2023-11-01 21:19:33 |5.2 | 10 | short | Complete | User1 |
81
+ | 12346 | 2023-11-01 21:20:01 |12.0 | 20 | long | Running | User2 |
82
+
83
+ In this example, the three data values we will use for our x, y and color variables are: start_time, queue_wait and nodes_requested. We would also like to use `parition` to facet my data and `user` as an additional categorical variable to filter on. In the [next section](#3-configure-visualization), we show how to specify which columns in your dataset correspond to parts of the visualizaiton.
84
+
85
+ The `load_data()` function will format your data for json serialization and will update the visualization if it has already been run. This function will report out any columns or rows which are dropped from the original dataset due to conainting `null`/`NaN`/`None` values or unallowed datatypes like `timedelta`s.
86
+
87
+ ### 3. Configure Visualization
88
+ ```python
89
+ gp.vis_configs = {
90
+ 'x': 'start_time',
91
+ 'y': 'queue_wait',
92
+ 'color': 'nodes_requested',
93
+ 'color_agg': 'avg',
94
+ 'categorical': 'user',
95
+ 'facet_by': 'partition'
96
+ }
97
+ ```
98
+ Configuration Descriptions
99
+ `x`: Name of the column in the dataframe which will be shown on the x axis of Guidepost's subcharts.
100
+ `y`: Name of the column in the dataframe which will be shown on the y axis of Guidepost's subcharts.
101
+ `color`: Name of the column in the dataframe which will be shown by the darkness of each square's color.
102
+ `color_agg`: The aggregation method used to determine the color. Can be: 'avg', 'variance', 'std', 'sum', or 'median'
103
+ `categorical`: Name of the column containing categorical data values which will be shown on a bar chart associated with each group of the data.
104
+ `facet_by`: Name of the column containing categorical data values which dictate the highest level grouping of the data. Dictates how many sub charts are produced in the visualization.
105
+
106
+ See the [Vis Configs Section](#vis_configs) for more details on datatype restrictions for each configuration.
107
+
108
+ ### 4. Run Visualization
109
+ ```python
110
+ gp
111
+ ```
112
+
113
+ Run the above command in a Jupyter notebook cell to start the visualization.
114
+
115
+ Here is an example of what the viusalization will look like:
116
+
117
+ ![Image of the guidepost visualization. Annotations label various parts of the visualization: 'Data Grouping Name', 'Color by Categorical Variable', 'Bar Chart (Filter on Click)', 'Current Selection of Records for Export'](figs/guidepost_tutorial_info.png)
118
+
119
+ Here we explain some elements of the visualization:
120
+
121
+
122
+ #### `Data Grouping Name`:
123
+ This is name of the high level groups which are dictated by the `facet_by` configuration. If your data only logically contains one group, adding a synthetic column is advised and specifying that column name for the `facet_by` cofiguration.
124
+
125
+ #### `Main Summary View`:
126
+ The main summary view is the primary view associated with each group of data specified by `facet_by` configuration. This view shows the data organized by the x and y axes. Data values at similar locations along the x and y axes are grouped into squares at that location. The amount of data in each row and column are shown with the histograms framing this view. The color of each square shows an aggregrate of a third numerical variable that exists on each data value.
127
+
128
+ #### `Color by Numerical Variable`:
129
+ Each square in the main summary view is an aggregrate of datapoints at that x and y location. The color of a given square is dictated by the variable shown here. For example, in the bottom subchart, we see that there is a correlation between higher queue_waits, queue_wait_predictions and processor counts. The darker squares indicate higher processor counts on average.
130
+
131
+
132
+ #### `Bar Chart (Filter on Click)`:
133
+ The bar chart in the lower right hand corner of each row of subcharts shows the top ten instances of the column passed to the `categorical` configuration. It will filter the dataset when a bar is hovered over. Clicking a bar will fix that filter in place. Clicking again will remove the filter when the mouse leaves the bar.
134
+
135
+
136
+ #### `Current Seleciton of Records for Export`:
137
+ Records can be selected for export from the visualization by brushing over the right and bottom histograms. The area of selected data is indicated by the orange coloring on the main summary view. The amont of records selected is indicated at the top left for each chart. Selections can be made across multiple charts. The final selection is returned as one dataframe containg all selections.
138
+
139
+
140
+ ### 5. Retrieve Selections from Visualization
141
+
142
+ ```python
143
+ df = gp.retrieve_selected_data()
144
+ ```
145
+
146
+ After selecting data by brushing over either the bottom or right histograms associated with a subchart, you can retrieve selected data using the above method.
147
+
148
+ This will return a pandas dataframe containing all your subselected rows from the original dataset.
149
+
150
+
151
+
152
+
153
+ ---
154
+
155
+ ## Example Dataset
156
+ Below is an example of the kind of data Guidepost works with:
157
+
158
+ | job_id |start_time | queue_wait | nodes_requested | partition | status | user |
159
+ |--------|-----------------------------|----------------|-----------------|-----------|------------|--------|
160
+ | 12345 | 2023-11-01 21:19:33 |5.2 | 10 | short | Complete | User1 |
161
+ | 12346 | 2023-11-01 21:20:01 |12.0 | 20 | long | Running | User2 |
162
+
163
+ ---
164
+
165
+ ## API Reference
166
+
167
+ ### `vis_data`
168
+ - **Description**: Holds the vis data to passed to the visualization. Updates to this variable will automatically update the visualization.
169
+
170
+
171
+ ### `vis_configs`
172
+ - **Description**: Holds the vis configurations to passed to the visualization. Updates to this variable will automatically update the visualization.
173
+
174
+ Vis configurations must be specified as a python dictonary with the following fields:
175
+ - 'x': The column from the pandas dataframe which will be shown on the x axis. This can be a integer, float or datetime variable.
176
+ - 'y': The column from the pandas dataframe which will be shown on the y axis of this visualization. This can be an integer or float.
177
+ - 'color': The column from the pandas dataframe which will determine the color of squares in the main summary view. This can be an integer or float.
178
+ - 'color_agg': This is a specification for what aggregation is used for the color variable. It can be: 'avg', 'variance', 'std', 'sum', or 'median'
179
+ - 'categorical': A categorical variable from the dataset. The data column must be a string datatype. The visualization will show the top 10 instances of this variable.
180
+ - 'facet_by': A categorical variable from the dataset. Automatically looks for 'queue' or 'partition' if this config is not specified.
181
+
182
+
183
+
184
+ ### `retrieve_selected_data()`
185
+ - **Description**: Returns selected data back from the visualization.
186
+ - **Returns**:
187
+ - `subselection` (DataFrame or str): A Pandas DataFrame that contains subselected data specified from selections made to the visualization.
188
+
189
+ ---
190
+
191
+ ## Contributing
192
+
193
+ Contributions to Guidepost are welcome! To contribute:
194
+
195
+ 1. Fork the repository.
196
+ 2. Create a new branch for your feature or bugfix.
197
+ 3. Submit a pull request with a detailed description of your changes.
198
+
199
+ ---
200
+
201
+ ## License
202
+
203
+ Guidepost is licensed under the MIT License. See the `LICENSE` file for details.
204
+
205
+ ---
206
+
207
+ ## Acknowledgments
208
+
209
+ Guidepost was developed under the auspices and with funding provided by the National Renewable Energy Laboratory (NREL).
210
+
211
+ ---
212
+
213
+ ## Contact
214
+
215
+ For questions or feedback, please reach out to the maintainer at [cscullyallison@sci.utah.edu].
216
+
@@ -0,0 +1,188 @@
1
+ # Guidepost
2
+
3
+ Guidepost is a Python library designed for seamless integration into Jupyter notebooks to visualize High Performance Computing (HPC) job data. It simplifies the process of understanding HPC workloads by providing a single, interactive visualization that offers an intuitive overview of job performance, resource usage, and other critical metrics.
4
+
5
+ ---
6
+
7
+ ## Features
8
+
9
+ - **Jupyter Notebook Integration**: Designed for your existing workflow. Load and interact with the visualization directly in your Jupyter environment.
10
+ - **HPC Job Data Insights**: Visualize key metrics, including job runtimes, resource usage, and queue performance.
11
+ - **Interactive Exploration**: Export selections of specific jobs or groups of jobs for deeper analysis.
12
+ - **Lightweight and Easy to Use**: Focused on simplicity and efficiency for HPC users.
13
+
14
+ ---
15
+
16
+ ## Installation
17
+
18
+ Guidepost is available on PyPI. You can install it using pip:
19
+
20
+ ```bash
21
+ pip install guidepost
22
+ ```
23
+
24
+ ---
25
+
26
+ ## Quick Start
27
+
28
+ ### 1. Import and Initialize Guidepost
29
+
30
+ ```python
31
+ from guidepost import Guidepost
32
+ gp = Guidepost()
33
+ ```
34
+
35
+ ### 2. Load Your Data
36
+
37
+
38
+ ```python
39
+ import pandas as pd
40
+ jobs_data = pd.read_parquet("data/jobs_data.parquet")
41
+ gp.load_data(jobs_data)
42
+ ```
43
+
44
+ Guidepost supports input data in a Pandas DataFrame format.
45
+
46
+ At least three numerical and 2 categorical columns are required. Datetime columns are also supported for encoding on the x axis.
47
+
48
+ Here is a sample table containg jobs-related data from a supercomputer scheduling system:
49
+
50
+ | job_id |start_time | queue_wait | nodes_requested | partition | status | user |
51
+ |--------|-----------------------------|----------------|-----------------|-----------|------------|--------|
52
+ | 12345 | 2023-11-01 21:19:33 |5.2 | 10 | short | Complete | User1 |
53
+ | 12346 | 2023-11-01 21:20:01 |12.0 | 20 | long | Running | User2 |
54
+
55
+ In this example, the three data values we will use for our x, y and color variables are: start_time, queue_wait and nodes_requested. We would also like to use `parition` to facet my data and `user` as an additional categorical variable to filter on. In the [next section](#3-configure-visualization), we show how to specify which columns in your dataset correspond to parts of the visualizaiton.
56
+
57
+ The `load_data()` function will format your data for json serialization and will update the visualization if it has already been run. This function will report out any columns or rows which are dropped from the original dataset due to conainting `null`/`NaN`/`None` values or unallowed datatypes like `timedelta`s.
58
+
59
+ ### 3. Configure Visualization
60
+ ```python
61
+ gp.vis_configs = {
62
+ 'x': 'start_time',
63
+ 'y': 'queue_wait',
64
+ 'color': 'nodes_requested',
65
+ 'color_agg': 'avg',
66
+ 'categorical': 'user',
67
+ 'facet_by': 'partition'
68
+ }
69
+ ```
70
+ Configuration Descriptions
71
+ `x`: Name of the column in the dataframe which will be shown on the x axis of Guidepost's subcharts.
72
+ `y`: Name of the column in the dataframe which will be shown on the y axis of Guidepost's subcharts.
73
+ `color`: Name of the column in the dataframe which will be shown by the darkness of each square's color.
74
+ `color_agg`: The aggregation method used to determine the color. Can be: 'avg', 'variance', 'std', 'sum', or 'median'
75
+ `categorical`: Name of the column containing categorical data values which will be shown on a bar chart associated with each group of the data.
76
+ `facet_by`: Name of the column containing categorical data values which dictate the highest level grouping of the data. Dictates how many sub charts are produced in the visualization.
77
+
78
+ See the [Vis Configs Section](#vis_configs) for more details on datatype restrictions for each configuration.
79
+
80
+ ### 4. Run Visualization
81
+ ```python
82
+ gp
83
+ ```
84
+
85
+ Run the above command in a Jupyter notebook cell to start the visualization.
86
+
87
+ Here is an example of what the viusalization will look like:
88
+
89
+ ![Image of the guidepost visualization. Annotations label various parts of the visualization: 'Data Grouping Name', 'Color by Categorical Variable', 'Bar Chart (Filter on Click)', 'Current Selection of Records for Export'](figs/guidepost_tutorial_info.png)
90
+
91
+ Here we explain some elements of the visualization:
92
+
93
+
94
+ #### `Data Grouping Name`:
95
+ This is name of the high level groups which are dictated by the `facet_by` configuration. If your data only logically contains one group, adding a synthetic column is advised and specifying that column name for the `facet_by` cofiguration.
96
+
97
+ #### `Main Summary View`:
98
+ The main summary view is the primary view associated with each group of data specified by `facet_by` configuration. This view shows the data organized by the x and y axes. Data values at similar locations along the x and y axes are grouped into squares at that location. The amount of data in each row and column are shown with the histograms framing this view. The color of each square shows an aggregrate of a third numerical variable that exists on each data value.
99
+
100
+ #### `Color by Numerical Variable`:
101
+ Each square in the main summary view is an aggregrate of datapoints at that x and y location. The color of a given square is dictated by the variable shown here. For example, in the bottom subchart, we see that there is a correlation between higher queue_waits, queue_wait_predictions and processor counts. The darker squares indicate higher processor counts on average.
102
+
103
+
104
+ #### `Bar Chart (Filter on Click)`:
105
+ The bar chart in the lower right hand corner of each row of subcharts shows the top ten instances of the column passed to the `categorical` configuration. It will filter the dataset when a bar is hovered over. Clicking a bar will fix that filter in place. Clicking again will remove the filter when the mouse leaves the bar.
106
+
107
+
108
+ #### `Current Seleciton of Records for Export`:
109
+ Records can be selected for export from the visualization by brushing over the right and bottom histograms. The area of selected data is indicated by the orange coloring on the main summary view. The amont of records selected is indicated at the top left for each chart. Selections can be made across multiple charts. The final selection is returned as one dataframe containg all selections.
110
+
111
+
112
+ ### 5. Retrieve Selections from Visualization
113
+
114
+ ```python
115
+ df = gp.retrieve_selected_data()
116
+ ```
117
+
118
+ After selecting data by brushing over either the bottom or right histograms associated with a subchart, you can retrieve selected data using the above method.
119
+
120
+ This will return a pandas dataframe containing all your subselected rows from the original dataset.
121
+
122
+
123
+
124
+
125
+ ---
126
+
127
+ ## Example Dataset
128
+ Below is an example of the kind of data Guidepost works with:
129
+
130
+ | job_id |start_time | queue_wait | nodes_requested | partition | status | user |
131
+ |--------|-----------------------------|----------------|-----------------|-----------|------------|--------|
132
+ | 12345 | 2023-11-01 21:19:33 |5.2 | 10 | short | Complete | User1 |
133
+ | 12346 | 2023-11-01 21:20:01 |12.0 | 20 | long | Running | User2 |
134
+
135
+ ---
136
+
137
+ ## API Reference
138
+
139
+ ### `vis_data`
140
+ - **Description**: Holds the vis data to passed to the visualization. Updates to this variable will automatically update the visualization.
141
+
142
+
143
+ ### `vis_configs`
144
+ - **Description**: Holds the vis configurations to passed to the visualization. Updates to this variable will automatically update the visualization.
145
+
146
+ Vis configurations must be specified as a python dictonary with the following fields:
147
+ - 'x': The column from the pandas dataframe which will be shown on the x axis. This can be a integer, float or datetime variable.
148
+ - 'y': The column from the pandas dataframe which will be shown on the y axis of this visualization. This can be an integer or float.
149
+ - 'color': The column from the pandas dataframe which will determine the color of squares in the main summary view. This can be an integer or float.
150
+ - 'color_agg': This is a specification for what aggregation is used for the color variable. It can be: 'avg', 'variance', 'std', 'sum', or 'median'
151
+ - 'categorical': A categorical variable from the dataset. The data column must be a string datatype. The visualization will show the top 10 instances of this variable.
152
+ - 'facet_by': A categorical variable from the dataset. Automatically looks for 'queue' or 'partition' if this config is not specified.
153
+
154
+
155
+
156
+ ### `retrieve_selected_data()`
157
+ - **Description**: Returns selected data back from the visualization.
158
+ - **Returns**:
159
+ - `subselection` (DataFrame or str): A Pandas DataFrame that contains subselected data specified from selections made to the visualization.
160
+
161
+ ---
162
+
163
+ ## Contributing
164
+
165
+ Contributions to Guidepost are welcome! To contribute:
166
+
167
+ 1. Fork the repository.
168
+ 2. Create a new branch for your feature or bugfix.
169
+ 3. Submit a pull request with a detailed description of your changes.
170
+
171
+ ---
172
+
173
+ ## License
174
+
175
+ Guidepost is licensed under the MIT License. See the `LICENSE` file for details.
176
+
177
+ ---
178
+
179
+ ## Acknowledgments
180
+
181
+ Guidepost was developed under the auspices and with funding provided by the National Renewable Energy Laboratory (NREL).
182
+
183
+ ---
184
+
185
+ ## Contact
186
+
187
+ For questions or feedback, please reach out to the maintainer at [cscullyallison@sci.utah.edu].
188
+