TU-Wien-dataLAB / Grader-Service

Grader Service offers lecturers and students a well integrated teaching environment for data science, machine learning and programming classes.
https://grader-service.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
27 stars 2 forks source link

Make cell timeout configurable for autograding #148

Closed meffmadd closed 8 months ago

meffmadd commented 8 months ago

Is your feature request related to a problem? Please describe. Right now the cell timeout is hardcoded to 360 seconds. Also, a timeout is only set in KubeAutogradeExecutor not in the parent class.

Describe the solution you'd like The cell timeout should be configurable with a callable that returns the cell timeout. The return value of thistimeout_func is then passed to the ExecutePreprocessor. The functionality for this is already implemented in NotebookClient.timeout (see: https://nbgrader.readthedocs.io/en/stable/configuration/config_options.html).

The difference between this and NotebookClient.timeout_func is that we do it on the lecture level (timeout_func returns timeout for each lecture) and NotebookClient.timeout_func works on the cell level (returns timeout for cells).