Repository navigation
Write a Boolean answer as 1 or 0, compared as a string - #97
Open
peterbjohnson wants to merge 1 commit into
Open
peterbjohnson wants to merge 1 commit into
peterbjohnson wants to merge 1 commit into
Conversation
Lambda Feedback's own teacher test of a Boolean area sends isExactEqual
answer 1, submission 1 and gradeParams {type: "str"}. in2lambda wrote
the answer as true and no gradeParams, so a correct response of 1 never
matched. The Python API keeps bool; the JSON now holds 1 or 0, for the
answer and test payloads, with type "str" unless the author sets it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Boolean areas built on Lambda Feedback mark correctly. Boolean areas exported by in2lambda don't.
When the platform runs a Boolean area's teacher test, it sends
isExactEqualthe following:answer: 1submission: 1gradeParams: {type: "str"}in2lambda wrote
"answer": trueand"gradeParams": null. So a student's1was compared withtrue, and the evaluation function had no type to cast them to. The platform's response area code (TrueFalsein the response area sandbox) also saves the answer, and sends each student's choice, as1or0.bool. In the JSON, a Boolean area's answer and its test payloads are written as1or0.gradeParamsfor a Boolean area default to{"type": "str"}, with anygrade_paramsthe author sets merged over them. This is howNumericUnitsaddsphysical_quantity.Not yet checked by importing a set to the platform and running its teacher test.
🤖 Generated with Claude Code