Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Create a Dashboard page to provide a better onboarding experience #2136

Merged
merged 92 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from 90 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
7543d77
add show/hide system metric icons
arsengit Jan 25, 2022
a1576c7
Add circle question icon to icomoon set.
Hamik25 Jan 25, 2022
0ce5b22
Added run overview icons
arsengit Feb 17, 2022
ac28dc9
Merge branch 'main' into add-new-icon
arsengit Feb 17, 2022
3738cf2
resolved conflicts with main branch
arsengit Feb 17, 2022
fc515c2
Merge branch 'main' into add-new-icon
arsengit Mar 6, 2022
ce726b4
added avatar and branch icons
arsengit Mar 6, 2022
1478ad3
Merge branch 'main' into add-new-icon
arsengit Mar 6, 2022
807fbe4
Merge branch 'main' into add-new-icon
arsengit Mar 9, 2022
10b6380
Merge branch 'main' of https://github.com/aimhubio/aim into feature/a…
VkoHov Mar 17, 2022
5c7497a
Added color scale icons
VkoHov Mar 17, 2022
c9cbf61
Merge branch 'main' of https://github.com/aimhubio/aim into feature/a…
VkoHov Mar 17, 2022
05cd163
Merge branch 'main' of https://github.com/aimhubio/aim into feature/a…
rubenaprikyan Mar 23, 2022
c3231ae
Add text icon
rubenaprikyan Mar 23, 2022
cbb3232
Merge branch 'main' of https://github.com/aimhubio/aim into feature/a…
VkoHov Mar 29, 2022
eda5e3c
Add minus icon
VkoHov Mar 29, 2022
8c68335
Add minus name to icon types
VkoHov Mar 29, 2022
a09277d
added update time icon
arsengit Apr 26, 2022
c380fc7
Merge branch 'main' into add-new-icon
arsengit May 2, 2022
276fb37
Merge branch 'main' into feature/add-new-icon
arsengit Jun 28, 2022
ba646f2
[feat] Add info circle outline icon
arsengit Jun 29, 2022
c045766
Merge branch 'main' into feature/add-new-icon
KaroMourad Jul 13, 2022
fd08eb4
[feat] Add axes-props icon
KaroMourad Jul 13, 2022
7ea5cd4
Merge branch 'main' into feature/add-new-icon
arsengit Jul 26, 2022
4b59b7b
[feat] Add compare icon
arsengit Jul 26, 2022
b1c3ed0
Merge branch 'main' into add-new-icon
arsengit Aug 3, 2022
c982d8d
[feat] Add box-settings, full-screen and new-tab icons
arsengit Aug 3, 2022
9ea8a7d
Merge branch 'main' into feature/add-icon
arsengit Aug 12, 2022
bb64103
[feat] Add figures-explorer icon
arsengit Aug 12, 2022
0d8dfa8
[feat] Add group-column icon
arsengit Aug 17, 2022
e9e7360
Merge branch 'main' into feature/add-icon
arsengit Aug 17, 2022
135d489
[feat] Change home page layout
arsengit Sep 1, 2022
00b363b
Merge branch 'main' of https://github.com/aimhubio/aim into feature/a…
VkoHov Sep 2, 2022
a886262
[feat] Added contained arrows set
VkoHov Sep 2, 2022
c7f722f
Merge branch 'main' into feature/enhance-home-page
arsengit Sep 2, 2022
c194b51
[feat] Add HomeLeft and HomeRight components
arsengit Sep 2, 2022
172eb9c
[feat] Add experiments table (#2048)
arsengit Sep 6, 2022
0a2f5ac
[feat] Add quick links to explore runs (#2140)
arsengit Sep 6, 2022
e6431b1
[feat] Display bookmarks list (#2148)
arsengit Sep 7, 2022
960828d
[feat] Display tags table on the home page (#2154)
arsengit Sep 8, 2022
b8a7265
[feat] Add release notes api with new network service (#2166)
arsengit Sep 19, 2022
fa2e025
[feat] Use new network service in Dashboard page (#2165)
arsengit Sep 23, 2022
00f19f2
[feat] Display release notes in Dashboard page (#2195)
arsengit Sep 25, 2022
c7be125
[feat] Display guide links to docs on the Dashboard page (#2198)
arsengit Sep 25, 2022
b4765b9
Merge branch 'main' into feature/enhance-home-page
arsengit Sep 26, 2022
c90b7d1
[feat] Change the experiments and tags table style on the dashboard p…
arsengit Sep 26, 2022
a61513f
[feat] Change bookmarks style on the Dashboard page (#2201)
arsengit Sep 26, 2022
bf02720
Provide API endpoints for `Dashboard` page
mihran113 Sep 27, 2022
a9cf888
Add archived runs count for `projects/activity/` endpoint
mihran113 Sep 28, 2022
712db4b
[feat] Display the last three successful queries on the Dashboard pag…
arsengit Sep 28, 2022
1952203
Merge branch 'main' into feature/add-icon
KaroMourad Sep 29, 2022
263a0b0
[feat] Add tooltip appearance icons
VkoHov Sep 29, 2022
acdc622
[fix] Fix the icons names duplication
VkoHov Sep 29, 2022
2da240b
Merge branch 'main' into feature/enhance-home-page
arsengit Sep 29, 2022
ae7546c
[feat] Add audio and distributions icons
KaroMourad Sep 29, 2022
21a3fd1
Merge branch 'feature/add-icon' into feature/enhance-home-page
KaroMourad Sep 29, 2022
e92e033
[feat] Add project statistics info in Dashboard page (#2217)
KaroMourad Sep 29, 2022
24eac22
[feat] Add ability to navigate to existing explorers from statistics …
KaroMourad Sep 30, 2022
2781f8b
[feat] Display Contributions feed on Dashboard page (#2223)
arsengit Sep 30, 2022
f955702
[feat] Display in progress runs on the Dashboard page (#2202)
arsengit Sep 30, 2022
79d9d5d
Merge branch 'main' into feature/enhance-home-page
arsengit Sep 30, 2022
c23f0e9
Merge branch 'main' into feature/enhance-home-page
arsengit Oct 1, 2022
8b8785c
[feat] Add quick start section to the Dashboard page (#2218)
roubkar Oct 2, 2022
95a0236
[feat] Display nav link to tag page in Dashboard page (#2227)
arsengit Oct 2, 2022
ecead66
[fix] Fix displaying run count issue in the HeatMap cell (#2226)
arsengit Oct 2, 2022
45e6243
[feat] Add integrations section to the Dashboard page (#2221)
roubkar Oct 2, 2022
ee7a6bc
[fix] Fix state destroying issue in the Dashboard page (#2229)
arsengit Oct 2, 2022
66d27ee
[fix] Rename directories and files from home to dashboard (#2232)
arsengit Oct 3, 2022
9800f94
[fix] Add timezone to request headers (#2233)
arsengit Oct 3, 2022
e3428ef
Add endpoint to retrieve active runs only and add active runs count f…
mihran113 Oct 3, 2022
50c4c3a
[feat] Remove unused components on the Dashboard page (#2234)
arsengit Oct 3, 2022
25d0e3a
[feat] Use new active runs endpoint on the Dashboard page (#2235)
arsengit Oct 3, 2022
9ea2158
[feat] Add guides docs links on the Dashboard page (#2237)
arsengit Oct 3, 2022
832cfae
Merge branch 'main' into feature/enhance-home-page
arsengit Oct 4, 2022
68399ac
Merge branch 'feature/enhance-home-page' into feature/add-icon
arsengit Oct 4, 2022
e5cb73a
[feat] Add dashboard icon
arsengit Oct 4, 2022
a3d65da
Merge branch 'feature/add-icon' into feature/enhance-home-page
arsengit Oct 4, 2022
9332b75
[fix] Add missing dashboard name enum in Icon.d.ts
arsengit Oct 4, 2022
351016a
Merge branch 'feature/add-icon' into feature/enhance-home-page
arsengit Oct 4, 2022
60d2780
[feat] Change dashboard icon
arsengit Oct 4, 2022
15c3ac0
Merge branch 'feature/add-icon' into feature/enhance-home-page
arsengit Oct 4, 2022
4690821
[fix] Remove contributor nicknames from the release notes (#2239)
arsengit Oct 4, 2022
1f7ccb8
[feat] Add outlined state on project statistics cards (#2238)
KaroMourad Oct 4, 2022
6dda8d8
Update CHANGELOG.md
arsengit Oct 4, 2022
3cbca61
[fix] Fix showing release notes container scroll shadow issue
arsengit Oct 4, 2022
043f03d
Merge branch 'main' into feature/enhance-home-page
arsengit Oct 4, 2022
c9ad895
Fix sanity check
mihran113 Oct 4, 2022
8239ed6
[fix] Fix tags content rendering issue on Dashboard page
arsengit Oct 5, 2022
03d04ca
Merge branch 'feature/enhance-home-page' of github.com:aimhubio/aim i…
arsengit Oct 5, 2022
e2aed2f
[feat] Add soon badge on dashboard statistic cards (#2244)
KaroMourad Oct 5, 2022
1f66459
[feat] Add ability to query recent searches in the new tab
arsengit Oct 5, 2022
e5f1f60
Merge branch 'main' into feature/enhance-home-page
arsengit Oct 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Add command for dangling params cleanup (mihran113)
- Deprecate Python 3.6 (alberttorosyan)
- Add MXNet integration (tmynn)
- Create a Dashboard page to provide a better onboarding experience (arsengit, roubkar, KaroMourad, mihran113)

### Fixes:

Expand Down
3 changes: 3 additions & 0 deletions aim/sdk/remote_repo_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ def __init__(self, client: 'Client'):

def list_all_runs(self):
return self._rpc_client.run_instruction(-1, self._handler, 'list_all_runs', [])

def list_active_runs(self):
return self._rpc_client.run_instruction(-1, self._handler, 'list_active_runs', [])
14 changes: 14 additions & 0 deletions aim/sdk/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,20 @@ def _all_run_hashes(self) -> Set[str]:
def list_all_runs(self) -> List[str]:
return list(self._all_run_hashes())

def _active_run_hashes(self) -> Set[str]:
if self.is_remote_repo:
remote_repo = RemoteRepoProxy(self._client)
return set(remote_repo.list_active_runs())
else:
chunks_dir = os.path.join(self.path, 'meta', 'progress')
if os.path.exists(chunks_dir):
return set(os.listdir(chunks_dir))
else:
return set()

def list_active_runs(self) -> List[str]:
return list(self._active_run_hashes())

def total_runs_count(self) -> int:
db = self.structured_db
if db:
Expand Down
6 changes: 5 additions & 1 deletion aim/sdk/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,11 @@ def _get_sequence(
sequence = seq_cls(sequence_name, context, self)
return sequence if bool(sequence) else None

def collect_sequence_info(self, sequence_types: Tuple[str, ...], skip_last_value=False) -> Dict[str, list]:
def collect_sequence_info(
self,
sequence_types: Union[str, Tuple[str, ...]],
skip_last_value=False
) -> Dict[str, list]:
"""Retrieve Run's all sequences general overview.

Args:
Expand Down
1 change: 1 addition & 0 deletions aim/web/api/dashboards/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class DashboardOut(BaseModel):
name: str
description: str = None
app_id: Optional[UUID] = None
app_type: Optional[str] = None
updated_at: datetime = 'Wed, 01 Jan 2021 16:12:07 GMT'
created_at: datetime = 'Wed, 01 Jan 2021 16:12:07 GMT'

Expand Down
1 change: 1 addition & 0 deletions aim/web/api/dashboards/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def dashboard_response_serializer(dashboard_object, session):
'name': dashboard_object.name,
'description': dashboard_object.description,
'app_id': app.uuid if app else None,
'app_type': app.type if app else None,
'updated_at': dashboard_object.updated_at,
'created_at': dashboard_object.created_at
}
Expand Down
4 changes: 3 additions & 1 deletion aim/web/api/projects/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ProjectApiOut(BaseModel):


class ProjectParamsOut(BaseModel):
params: Dict
params: Optional[Dict] = None
metric: Optional[Dict[str, list]] = None
images: Optional[Dict[str, list]] = None
texts: Optional[Dict[str, list]] = None
Expand All @@ -22,6 +22,8 @@ class ProjectParamsOut(BaseModel):
class ProjectActivityApiOut(BaseModel):
num_experiments: int
num_runs: int
num_archived_runs: int
num_active_runs: int
activity_map: Dict[str, int] = {"2021-01-01": 54}


Expand Down
18 changes: 13 additions & 5 deletions aim/web/api/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,20 @@ async def project_activity_api(x_timezone_offset: int = Header(default=0),
raise HTTPException(status_code=404)

num_runs = 0
num_archived_runs = 0
activity_counter = Counter()
for run in factory.runs():
creation_time = run.created_at - timedelta(minutes=x_timezone_offset)
activity_counter[creation_time.strftime('%Y-%m-%dT%H:00:00')] += 1
num_runs += 1
if run.archived:
num_archived_runs += 1

return {
'num_experiments': len(factory.experiments()),
'num_runs': num_runs,
'num_archived_runs': num_archived_runs,
'num_active_runs': len(project.repo.list_active_runs()),
'activity_map': dict(activity_counter),
}

Expand Down Expand Up @@ -118,7 +123,8 @@ async def update_pinned_metrics_api(request_data: ProjectPinnedSequencesApiIn):


@projects_router.get('/params/', response_model=ProjectParamsOut, response_model_exclude_defaults=True)
async def project_params_api(sequence: Optional[Tuple[str, ...]] = Query(())):
async def project_params_api(sequence: Optional[Tuple[str, ...]] = Query(()),
exclude_params: Optional[bool] = False):
project = Project()

if not project.exists():
Expand All @@ -131,10 +137,12 @@ async def project_params_api(sequence: Optional[Tuple[str, ...]] = Query(())):
raise HTTPException(status_code=400, detail=str(e))
else:
sequence = project.repo.available_sequence_types()

response = {
'params': project.repo.collect_params_info(),
}
if exclude_params:
response = {}
else:
response = {
'params': project.repo.collect_params_info(),
}
response.update(**project.repo.collect_sequence_info(sequence))
return response

Expand Down
9 changes: 7 additions & 2 deletions aim/web/api/runs/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,19 @@ class RunInfoOut(BaseModel):


class RunSearchRunView(BaseModel):
params: dict
traces: List[TraceOverview]
params: Optional[dict]
traces: Optional[List[TraceOverview]]
props: PropsView


RunSearchApiOut = Dict[str, RunSearchRunView]


class RunActiveOut(BaseModel):
traces: Dict[str, List[TraceOverview]]
props: PropsView


# request models
class AlignedTraceIn(BaseModel):
context: dict
Expand Down
40 changes: 37 additions & 3 deletions aim/web/api/runs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ async def metric_search_result_streamer(traces: SequenceCollection,
async def run_search_result_streamer(runs: SequenceCollection,
limit: int,
skip_system: bool,
report_progress: Optional[bool] = True) -> bytes:
report_progress: Optional[bool] = True,
exclude_params: Optional[bool] = False,
exclude_traces: Optional[bool] = False) -> bytes:
try:
run_count = 0
last_reported_progress_time = time.time()
Expand All @@ -247,11 +249,13 @@ async def run_search_result_streamer(runs: SequenceCollection,
run = run_trace_collection.run
run_dict = {
run.hash: {
'params': get_run_params(run, skip_system=skip_system),
'traces': run.collect_sequence_info(sequence_types='metric'),
'props': get_run_props(run)
}
}
if not exclude_params:
run_dict[run.hash]['params'] = get_run_params(run, skip_system=skip_system)
if not exclude_traces:
run_dict[run.hash]['traces'] = run.collect_sequence_info(sequence_types='metric')

encoded_tree = encode_tree(run_dict)
yield collect_streamable_data(encoded_tree)
Expand All @@ -269,6 +273,36 @@ async def run_search_result_streamer(runs: SequenceCollection,
pass


async def run_active_result_streamer(repo: 'Repo', report_progress: Optional[bool] = True):
try:
active_run_hashes = repo.list_active_runs()

active_runs_count = len(active_run_hashes)
progress_reports_sent = 0

for run_hash in active_run_hashes:
await asyncio.sleep(ASYNC_SLEEP_INTERVAL)

run = Run(run_hash, repo=repo, read_only=True)
run_dict = {
run.hash: {
'props': get_run_props(run),
'traces': run.collect_sequence_info(sequence_types='metric')
}
}

encoded_tree = encode_tree(run_dict)
yield collect_streamable_data(encoded_tree)

if report_progress:
yield collect_streamable_data(encode_tree(
{f'progress_{progress_reports_sent}': (progress_reports_sent + 1, active_runs_count)}
))
progress_reports_sent += 1
except asyncio.CancelledError:
pass


def collect_requested_metric_traces(run: Run, requested_traces: List[TraceBase], steps_num: int = 200) -> List[dict]:
processed_traces_list = []
for requested_trace in requested_traces:
Expand Down
18 changes: 17 additions & 1 deletion aim/web/api/runs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
get_run_params,
get_run_props,
metric_search_result_streamer,
run_active_result_streamer,
run_search_result_streamer,
run_logs_streamer

)
from aim.web.api.runs.pydantic_models import (
MetricAlignApiIn,
QuerySyntaxErrorOut,
RunActiveOut,
RunTracesBatchApiIn,
RunMetricCustomAlignApiOut,
RunMetricSearchApiOut,
Expand Down Expand Up @@ -59,6 +61,8 @@ async def run_search_api(q: Optional[str] = '',
offset: Optional[str] = None,
skip_system: Optional[bool] = True,
report_progress: Optional[bool] = True,
exclude_params: Optional[bool] = False,
exclude_traces: Optional[bool] = False,
x_timezone_offset: int = Header(default=0),):
from aim.sdk.sequence_collection import QueryRunSequenceCollection
repo = get_project_repo()
Expand All @@ -72,7 +76,9 @@ async def run_search_api(q: Optional[str] = '',
report_mode=QueryReportMode.PROGRESS_TUPLE,
timezone_offset=x_timezone_offset)

streamer = run_search_result_streamer(runs, limit, skip_system, report_progress)
streamer = run_search_result_streamer(runs, limit,
skip_system, report_progress,
exclude_params, exclude_traces)
return StreamingResponse(streamer)


Expand Down Expand Up @@ -116,6 +122,16 @@ async def run_metric_search_api(q: Optional[str] = '',
return StreamingResponse(streamer)


@runs_router.get('/active/', response_model=RunActiveOut)
async def get_active_runs_api(report_progress: Optional[bool] = True):
repo = get_project_repo()
repo._prepare_runs_cache()

streamer = run_active_result_streamer(repo)

return StreamingResponse(streamer)


@runs_router.get('/{run_id}/info/', response_model=RunInfoOut)
async def run_params_api(run_id: str,
skip_system: Optional[bool] = False,
Expand Down
28 changes: 28 additions & 0 deletions aim/web/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions aim/web/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
"@monaco-editor/react": "4.4.4",
"@types/marked": "^4.0.7",
"@uiw/react-textarea-code-editor": "^1.4.14",
"bs58check": "^2.1.2",
"classnames": "^2.3.1",
Expand All @@ -20,6 +21,7 @@
"highcharts-react-official": "^3.1.0",
"humanize-duration": "^3.27.0",
"lodash-es": "^4.17.21",
"marked": "^4.1.1",
"material-ui-audio-player": "^1.7.1",
"md5": "^2.3.0",
"memoize-one": "^5.2.1",
Expand Down
Binary file modified aim/web/ui/public/assets/icomoon/fonts/icomoon.eot
Binary file not shown.
Loading