-
Notifications
You must be signed in to change notification settings - Fork 2
Added possibility to add range of values as a grading parameter #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, 2 things I think could be done before we merge however:
- Updating the docs file to reflect the additional functionality
- I don't think inferring an answer should be compared in a range should by done by checking it's type. Since it sounds more like a parameter to me, could we keep
answer
as a number, and have something like arange
array in theparams
instead? This could also allow having an asymmetric accepted range around an answer.
Something like this:
{
"answer": x,
"response": x,
"params": {
"range": [min, max]
}
}
Let me know what you think about that, we should discuss this further.
To me the concept of "symmetric range" only makes sense to me if either it is defined with respect to some center point (as with atol or rtol) or if we expect different things to happen depending on what part of the range the response is in, e.g. the feedback will specify whether the response was both in the range as well as above or below the expected value. Currently there is no functionality like that as far as I am aware (is the returned real_diff and allowed_diff used for something else that ease of debugging at the moment?) I agree that checking the type is ugly, this was mostly me being lazy and wanting to quickly make something that I could test. I think a better solution is to always have the response be a string that is parsed, then it would be relatively easy to adjust the function so you could accept closed ranges, e.g. [a,b] (i.e. a =< x =< b), open ranges, e.g. (a,b) (i.e. a < x < b), or semi-closed ranges, e.g. (a,b], [a,b). |
Ok I understand your point Currently, the IsSimilar function has been configured to only work with NUMBER or TEXT response areas. The alpha site doesn't allow inputing arrays or lists as the answer to those fields. In general for ease of use and readability, I think we should try keep the For asymmetric ranges, a use-case I was thinking of was questions which deal with orders of magnitude for example. (e.g. the answer is 30, but any number between 10 and 99 is acceptable). To me, since only dealing with symmetric ranges doesn't add any functionality to the actual comparison - this is something that could be done by the front-end (teacher provides the answer as a range, which gets converted in the background to an answer+atol for the request made to the evaluation function). As for parametrising the valid range to the function, it doesn't need to be easily human-readable. Instead, we want requests to be unambiguous and as easy as possible for the code. This makes me sceptical about parsing strings you mentioned as inputs. These functions are essentially only called by our front-end, which can reshape the user input as much as it wants before making requests. In your example, we could have the user interface feature what you said here:
But then the actual web request made to the function could look like this: {
"answer": x,
"response": x,
"params": {
"range": [min, max],
"allow_min": <true or false> (open or closed range),
"allow_max": <true or false>
}
} |
Preemptive "Sorry for the wall of text. Yes, I know that I'm annoying". In general I am not sure it is a good idea to have the With regards to IsSimilar:
{
"answer": <number>,
"response": <number>,
"params": {
"atol": <number>,
"include_boundary": [<true or false>,<true or false>]
}
} where
|
Yeah I agree, I think the issue revolves around the fact that as soon as we go into more advanced functionalities, the frontend response area components become more tightly linked to the evaluation function they're connected to: additional functionality means both additional frontend UI components as well as additional evaluation function parameters and logic. The first concept of an evaluation function we came up with last year would hold both comparison logic and the code for the frontend component itself (similar to what you mentioned with Support for multiple correct answers is a feature that would benefit every evaluation function, so I've been working on incorporating that functionality within the base layer. As for just supplying strings in response and answer which require extensive parsing on the side of the evaluation function, I really don't think it should be done too often:
I personally don't mind keeping this on gh, we could move to a trello ticket or teams if you prefer - I do think the discussion is very valuable though. |
I agree that the discussion is valuable. It does not matter to me if it is on GitHub or Trello or elsewhere, but if we keep it on GitHub I think there are more appropriate places to have it, for example in connection with the eval function template, rather than one of the eval functions. Perhaps you can create an appropriate discussion somewhere with a short summary on previous discussions related to communication between the backend and frontend, and what should be done where? Or if this already exists, point me to it. |
No description provided.