hazel icon indicating copy to clipboard operation
hazel copied to clipboard

Offline grading infrastructure

Open cyrus- opened this issue 2 years ago • 12 comments

cyrus- avatar Jun 23 '22 03:06 cyrus-

Hi @cyrus- ,

We've found a way to move Printer into core https://github.com/hazelgrove/hazel/tree/haz3l-serde-in-core . When do you have time to meet so that we can discuss on the required information to display on gradescope?

LighghtEeloo avatar Sep 23 '22 04:09 LighghtEeloo

Required information is, for each exercise:

  • exercise name and number for reference
  • the student's test cases
  • the student's implementation
  • a grade report (text format) showing the autograder results, should look like what the UI reports, and the overall grade
  • the overall grade should be the point value that gradescope shows initially, and then graders can go in and do deductions from there (similar to how we did with learn ocaml)

This will require probably moving a few more things into core, e.g. stuff from SchoolExercise and Grading.

cyrus- avatar Sep 23 '22 05:09 cyrus-

I’m not sure, but SchoolExercise and Grading seem to be unrelated to core. There may be a different approach where we make a new lib school that doesn’t depend on web stuff and an executable that depends on school to perform serde. Maybe we can experiment on that.

LighghtEeloo avatar Sep 23 '22 05:09 LighghtEeloo

Yeah that's fine, you can call it haz3lschool for consistency.

cyrus- avatar Sep 23 '22 05:09 cyrus-

I'm curious about

image

this. Can someone give me a clue on what's the prompt doing here?

LighghtEeloo avatar Sep 23 '22 19:09 LighghtEeloo

The prompt is the exercise instructions. The annotations have to do with deriving. [@opaque] means that sexp deriving will not attempt to get an sexp from the Node.t, since nodes are not serializable that way. The [@printer] is for deriving show -- I'm using it for instructor mode exercise module export where the prompt is defined in a separate file, so the printer just inserts a variable "prompt" that gets bound by module export.

cyrus- avatar Sep 23 '22 19:09 cyrus-

For moving it into core, you can try to make 'node parameter to p that we only instantiate in web?

cyrus- avatar Sep 23 '22 20:09 cyrus-

That's the approach I did; but I'm a bit concerned about the future extensibility...

LighghtEeloo avatar Sep 23 '22 20:09 LighghtEeloo

I've just pushed the attempt using this approach (01e4697) /^o^/ Want some input on how it's doing...

LighghtEeloo avatar Sep 23 '22 20:09 LighghtEeloo

Looks likes its progressing reasonably, see comments -- I think we just want to package all school related things into a haz3lschool module.

Can you make a PR for future discussion.

cyrus- avatar Sep 23 '22 20:09 cyrus-

Sure! Will do once I get off the bus

LighghtEeloo avatar Sep 23 '22 20:09 LighghtEeloo

https://github.com/hazelgrove/hazel/pull/858

LighghtEeloo avatar Sep 23 '22 21:09 LighghtEeloo