Skip to content

Commit

Permalink
[fix] Make some minor fixes in reports' docs (#3231)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihran113 authored Oct 2, 2024
1 parent 2b06dff commit ac36a62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion aim/web/ui/public/aim_ui_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,10 @@ def render(self):

render_to_layout(component_data)

def group(self, prop, value=[]):
def group(self, prop, value):
if isinstance(value, str):
value = [value]

# group the data with the main grouping function
group_map, group_data = group(prop, self.data, value, self.key)

Expand Down
10 changes: 5 additions & 5 deletions docs/source/ui/pages/reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ TextsList(texts)
All the aforementioned objects have `group` method available to them:

```python
def group(prop, values=[]):
def group(prop: str, value: Union[str, list]):
...
```
`prop`- name of the property to be grouped by. Available options are: `color`, `stroke_style`, `row`, `column`
`prop`- name of the property to be grouped by. Available options are: `color`, `stroke_style`, `row`, `column` (the first 2 are available for `LineChart `only)

`value`- list of values of sequence fields to be grouped by. Available fields are all those fields that are also available in grouping options of the explorer pages.
`value`- single or multiple values of sequence fields to be grouped by. Available fields are all those fields that are also available in grouping options of the explorer pages.

The `group` method can be applied multiple times sequentially.

Expand All @@ -175,8 +175,8 @@ Example:
```aim
metrics = repo.fetch_metrics()
linechart = LineChart(metrics)
linechart.group('color', ['run.hash'])
linechart.group('row', ['metric_name'])
linechart.group('color', 'run.hash')
linechart.group('row', ['metric.name', 'metric.context.subset'])
```
````

Expand Down

0 comments on commit ac36a62

Please sign in to comment.