upb-lea / reinforcement_learning_course_materials

Lecture notes, tutorial tasks including solutions as well as online videos for the reinforcement learning course hosted by Paderborn University
MIT License
938 stars 212 forks source link

Tidy up tutorial solution notebooks and provide problem templates #2

Closed wallscheid closed 4 years ago

wallscheid commented 4 years ago
wkirgsn commented 4 years ago

Generation of "emptied" solution files that act as templates is perfectly possible with nbgrader, just enclosing stuff that needs to be hidden with "### BEGIN SOLUTION" and "# END SOLUTION".

Not sure what happens with travis-generated content, though. I think it can be commited next to the solution files with a small script in travis, then we would have a travis commit after each of our commits

Webbah commented 4 years ago

Does the enclosing works also for markdown? If not, how do we mark solutions there?

wkirgsn commented 4 years ago

Ok this is the instruction list:

  1. Install nbgrader with

    conda install jupyter
    conda install -c conda-forge nbgrader

    (do not use pip!)

  2. Get the folder structure right, such that nbgrader can work:

    • exercises/
      • nbgrader_config.py # configuration
      • templates/ # destination for autogenerated templates
      • solutions/ # actual source code (solutions with markers)
      • ex1/
      • ex2/ ...
  3. For each exercise solution notebook:

    • Open the notebook and click on View > Cell toolbar > Create Assignment
      • This enables assigning types and points to each cell
    • Mark task templates with "read-only", solution markdown with "manually graded answer", and solution code with "autograded answer", where solution lines are enclosed with ### BEGIN SOLUTION and ### END SOLUTION.
  4. Generate the template from the solution with nbgrader generate_assignment "<<exercise name>>", e.g. nbgrader generate_assignment "ex01"

I can go ahead and start with point 2 but I will need assistance for point 3 and all exercises except 1 and 8. The generation of the templates (point 4) from the solutions can be outsourced to TravisCI as soon as we have 1-3 finished.

wkirgsn commented 4 years ago

all templates are generated and readmes were created.