Customizing Dashboard in the platform
Add the report to dashboard
Once custom-reports are created, we need to configure how/where the reports need to be shown in the User Interface.
i.e. in which tab of the dashboard, what height should be used, etc.
This is done in the api_config.py with the CUSTOM_REPORT_TABS setting.
CUSTOM_REPORT_TABS Structure
CUSTOM_REPORT_TABS__Model = [
{
'text': 'Model Dependent',
'data': [
{'name': 'histogram_distribution', 'width': '33%', 'layout': {'height': 300}},
{'name': 'summary_stats', 'width': '33%', 'layout': {'height': 300}},
],
},
]
The CUSTOM_REPORT_TABS setting can be split up into three parts:
Object Level
CUSTOM_REPORT_TABS__<<OBJECT_NAME>> = ...
The name of the setting contains which dashboard the structure being described is for.
For example, CUSTOM_REPORT_TABS__Model is for the dashboard of Models in Model Registry.
Currently in the platform, the following Dashboards exist:
- DataElement
- DataQuality
- Feature
- Model
- Dataset
- Experiment
- Policy
Dashboard >> Tab Level
{
'text': 'Model Dependent', # The name of the tab
'data': [], # The reports to display within the tab
}
The next level is within these dashboards, which tabs need to be shown. Tabs are a way to categorize and segregate the reports into a logical structure.
textis used to specify the tab name for displaydatais a list of reports to display under the tab
Dashboard >> Tab >> Report Level
{'name': 'histogram_distribution', 'width': '33%', 'layout': {'height': 300}}
The next level represents a single report.
nameis the name property in the report class - which is used to match it to this item-
width/height(optional) can be used to customize the dimensions of the report -
The accepted values for
widthare:25%33%50%100%
If
widthparameter is not provided, it defaults to100%
To summarize, the CUSTOM_REPORT_TABS structure above shows that in the platform, the Model
dashboard includes one Model Dependent tab, which contains 2 custom reports:
histogram_distribution and summary_stats
Notes:
- The platform comes with a set of default reports, which are set using
CUSTOM_REPORT_TABS. These can be customized as required. - This configuration is used for all job-types: simulation, comparison, and validation.