Skip to content

Commit c807c2b

Browse files
KaranSwatcha-koreamrit110
authored
added model info card to sidebar (#498)
* added model info card to sidebar --------- Signed-off-by: Amrit Krishnan <amrit110@gmail.com> Co-authored-by: Ali Kore <akore0x5f@gmail.com> Co-authored-by: Amrit Krishnan <amrit110@gmail.com> Co-authored-by: Amrit K <amritk@vectorinstitute.ai>
1 parent 3d8283f commit c807c2b

File tree

4 files changed

+37
-7
lines changed

4 files changed

+37
-7
lines changed

cyclops/report/templates/cyclops_generic_template.jinja

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,16 @@
473473
</div>
474474
</label>
475475
<div id='sidebar'>
476-
<a href="https://vectorinstitute.github.io/cyclops/" target="_blank"><img
477-
src="https://raw.githubusercontent.com/VectorInstitute/cyclops/main/docs/source/theme/static/cyclops_logo-dark.png"
478-
alt="CyclOps Logo" id="logo"></a>
479-
<span class='title'>CARD SECTIONS</span>
476+
<div id="model_info_card">
477+
<div id="model_info">
478+
<h4 style="margin: 0.5rem;">{{ model_card.model_details.name }}</h4>
479+
<h6 style="margin: 0.5rem;">Model Monitoring Report</h6>
480+
<br>
481+
<h6 style="margin: 0.5rem;">Model Developed By: {{ model_card.model_details.owners[0].name }}</h6>
482+
<h6 style="margin: 0.5rem;">Contact: {{ model_card.model_details.owners[0].contact }}</h6>
483+
<h6 style="margin: 0.5rem;">Email: {{ model_card.model_details.owners[0].email }}</h6>
484+
</div>
485+
</div>
480486
<hr>
481487
<ul id='contents'>
482488
{% for name, section in model_card %}
@@ -703,6 +709,19 @@
703709
transition: margin-left 0.2s ease-in-out;
704710
}
705711
712+
#model_info_card {
713+
width: 100%;
714+
background-color: #0073e4;
715+
text-align: left;
716+
color: white;
717+
display: inline-block;
718+
}
719+
720+
#model_info {
721+
padding-top: 2.5rem;
722+
padding-left: 1rem;
723+
}
724+
706725
body {
707726
background-color: #f3f4f6;
708727
}

docs/source/tutorials/kaggle/heart_failure_prediction.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,17 +1082,23 @@
10821082
"source": [
10831083
"report.log_from_dict(\n",
10841084
" data={\n",
1085+
" \"name\": \"Heart Failure Prediction Model\",\n",
10851086
" \"description\": \"The model was trained on the Kaggle Heart Failure \\\n",
10861087
" Prediction Dataset to predict risk of heart failure.\",\n",
10871088
" },\n",
10881089
" section_name=\"model_details\",\n",
10891090
")\n",
1091+
"\n",
10901092
"report.log_version(\n",
10911093
" version_str=\"0.0.1\",\n",
10921094
" date=str(date.today()),\n",
10931095
" description=\"Initial Release\",\n",
10941096
")\n",
1095-
"report.log_owner(name=\"CyclOps Team\", contact=\"vectorinstitute.github.io/cyclops/\")\n",
1097+
"report.log_owner(\n",
1098+
" name=\"CyclOps Team\",\n",
1099+
" contact=\"vectorinstitute.github.io/cyclops/\",\n",
1100+
" email=\"cyclops@vectorinstitute.ai\",\n",
1101+
")\n",
10961102
"report.log_license(identifier=\"Apache-2.0\")\n",
10971103
"report.log_reference(\n",
10981104
" link=\"https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html\", # noqa: E501\n",

docs/source/tutorials/nihcxr/cxr_classification.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@
552552
"report.log_owner(\n",
553553
" name=\"Machine Learning and Medicine Lab\",\n",
554554
" contact=\"mlmed.org\",\n",
555-
" email=\"mlmed@gmail.com\",\n",
555+
" email=\"joseph@josephpcohen.com\",\n",
556556
")\n",
557557
"\n",
558558
"# considerations\n",

docs/source/tutorials/synthea/los_prediction.ipynb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,7 @@
13601360
"source": [
13611361
"report.log_from_dict(\n",
13621362
" data={\n",
1363+
" \"name\": \"Prolonged Length of Stay Prediction Model\",\n",
13631364
" \"description\": \"The model was trained on the Synthea synthetic dataset \\\n",
13641365
" to predict prolonged stay in the hospital.\",\n",
13651366
" },\n",
@@ -1370,7 +1371,11 @@
13701371
" date=str(date.today()),\n",
13711372
" description=\"Initial Release\",\n",
13721373
")\n",
1373-
"report.log_owner(name=\"CyclOps Team\", contact=\"vectorinstitute.github.io/cyclops/\")\n",
1374+
"report.log_owner(\n",
1375+
" name=\"CyclOps Team\",\n",
1376+
" contact=\"vectorinstitute.github.io/cyclops/\",\n",
1377+
" email=\"cyclops@vectorinstitute.ai\",\n",
1378+
")\n",
13741379
"report.log_license(identifier=\"Apache-2.0\")\n",
13751380
"report.log_reference(\n",
13761381
" link=\"https://xgboost.readthedocs.io/en/stable/python/python_api.html\", # noqa: E501\n",

0 commit comments

Comments
 (0)