Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • learn-renku/teaching-on-renku/autograde
  • fotis.georgatos/autograde
2 results
Show changes
Commits on Source (30)
# For finding latest versions of the base image see
# https://github.com/SwissDataScienceCenter/renkulab-docker
ARG RENKU_BASE_IMAGE=renku/renkulab-py:3.9-0.10.1
ARG RENKU_BASE_IMAGE=renku/renkulab-vnc:0.10.1
FROM ${RENKU_BASE_IMAGE}
# Uncomment and adapt if code is to be included in the image
......@@ -47,4 +47,4 @@ RUN if [ -n "$RENKU_VERSION" ] ; then \
fi \
fi
########################################################
\ No newline at end of file
########################################################
# autograde
`autograde` is a toolbox for testing Jupyter notebooks. Autograde executed of notebooks with consecutive unit testing of the final notebook state and allows refining results (e.g. grading plots by hand) in the audit mode. Autograde summarizes results in human and machine-readable formats.
`autograde` is a toolbox for testing Jupyter notebooks. Autograde executes notebooks with consecutive unit testing of the final notebook state and allows refining results (e.g. grading plots by hand) in the audit mode. Autograde summarizes results in human (html) and machine-readable (JSON) formats.
https://github.com/cssh-rwth/autograde
## Demo
......@@ -26,6 +26,24 @@ This command generates a compressed archive named `results_[Lastname1,Lastname2,
- `notebook.ipynb`: an identical copy of the tested notebook
- `restults.json`: test results
### Inspect and edit automatic grades
Let's use `autograde audit` to inspect and edit the grades generated by automatic testing located in subfolder `grading/`.
```bash
autograde audit grading/
```
To open an interactive audit interface triggered by this function we first need to switch to virtual desktop by clicking the VNC icon:
![image](https://renkulab.io/gitlab/learn-renku/teaching-on-renku/autograde/raw/master/images/toVNC.png)
Now we can access the interactive interface running at http://127.0.0.1:5000/
![image](https://renkulab.io/gitlab/learn-renku/teaching-on-renku/autograde/raw/master/images/audit_interface_480.gif)
**Preview** results of automtic grading.
![image](https://renkulab.io/gitlab/learn-renku/teaching-on-renku/autograde/raw/master/images/preview_results_480.gif)
**Edit** and **comment** the results of automatic grading.
![image](https://renkulab.io/gitlab/learn-renku/teaching-on-renku/autograde/raw/master/images/edit_results_480.gif)
### Generate Reports
Let's generate a human readable HTML report for grading results using `autograde report`, the command below generates a report inside the results archive `grading/results_\[Bar\,Foo\]_598b9a96.zip`.
```bash
......@@ -37,11 +55,19 @@ Let's uncompress the results
pushd grading/
unzip results_\[Bar\,Foo\]_598b9a96.zip
popd
```
Here is how the generated `grading/report.html` looks like:
![image](https://renkulab.io/gitlab/learn-renku/teaching-on-renku/autograde/raw/master/images/report_html.gif)
You can display the full contents of this report by opening it either from interactive session or locally.
Let's summarise results and generate inside subfolder `grading/` the follwoing 2 files:
- `summary.csv` with aggregated results
- `summary.html` with human readable summary report
```bash
autograde summary grading/
```
Here is how the generated summary `grading/summary.html` looks like:
![image](https://renkulab.io/gitlab/learn-renku/teaching-on-renku/autograde/raw/master/images/summary_html.gif)
images/audit_interface_480.gif

1.16 MiB

images/edit_results_480.gif

3.42 MiB

images/preview_results_480.gif

2.41 MiB

images/report.png

242 KiB

images/report_html.gif

1.12 MiB

images/summary.png

103 KiB

images/summary_html.gif

738 KiB

images/toVNC.png

18.8 KiB

%% Cell type:code id:a8b37641-13e8-4296-b75b-d674948d2090 tags:
``` python
from IPython.display import IFrame
```
%% Cell type:markdown id:893027df-8584-4274-bff5-0a362c9cac57 tags:
## Report
%% Cell type:code id:6c55e9ec-2ec2-4e18-a6fc-098976af9833 tags:
``` python
IFrame(src='./grading/report.html', width=1000, height=600)
```
%% Output
<IPython.lib.display.IFrame at 0x7f8ad4420730>
%% Cell type:markdown id:1eb51df0-4c7f-44bb-a980-fcd866ee6812 tags:
## Summary
%% Cell type:code id:66f01f82-718a-46b3-a923-e66a26c186be tags:
``` python
IFrame(src='./grading/summary.html', width=1000, height=600)
```
%% Output
<IPython.lib.display.IFrame at 0x7f8ad4420df0>
%% Cell type:code id:10af9474-ef76-42dd-9e2a-d6813d75b08e tags:
``` python
```