-
Notifications
You must be signed in to change notification settings - Fork 18
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
Example for output_visualizer is missing #351
Comments
@RagnarGrootKoerkamp Could you add an example of visualizers? |
Coincidentally, I was chatting about this with @mzuenni last week 😄 I think I'd like to have a working implementation in BAPCtools as well before the draft becomes final (see also RagnarGrootKoerkamp/BAPCtools#433), but we weren't 100% sure about some things. Forgot to actually ask the people here, but let's do that now then 😛 I'll just write from the top of my head what BAPCtools should do with visualizers (both input and output), and then I'd like to hear from others whether that's indeed what they expect tooling to do, based on the spec:
|
Great!
I'm aiming to declare the draft feature final at the end of the month. (We'll see how that goes...)
We definitely should specify how if should be called. My strong preference would be to follow the pattern from the input/static/output validators, so probably something like:
👍
Is there any other reason why an input visualizer would need the answer file, then that it want to produce a visualization that indicates the correct solution as well? My though was always that the input visualizer would not indicate the solution, since you could (should?) run the output visualizer on the answer file (or That said, the intended audience for input visualizations are judges, teachers, coaches, spectators, and such, not contestants and students, so it's not obviously broken for it to be more of a "test case visualization" and include the solution. I would prefer a pure input visualization over a test case visualization though.
👍
Wouldn't it make more sense for the tool running the output visualizer to move the resulting filer from |
the question is: what do we want. I think visualizing a test case can very much mean visualizing the solution and in the past this has shown to be very useful. Same goes for the "output" visualizer, do we want it to have access to the jury solution? I would again think that this can be useful. IMO it would be nicer to have:
|
Agreed, that is the more important question, and I was discussing it in the section after what you quoted :). My point here was "even if we want a pure input visualization, would there still be a reason for the input visualizer to have the answer file". But, you're right, we should answer the other question first.
Makes sense.
I already does, it uses the same arguments as the output validator, and I agree.
What would the difference be between what is generated by this input visualizer that gets the solution, versus running the output visualizer on the correct solution?
The current spec for the output visualizer, which includes what you say. |
yes. (except that output validator is also called with
Their purpose is entirely different. The A random example would be that the |
Ok, that works. Let me verify something else. We all agree that "what the input visualizer produces" is exactly the "Illustrations" described in the test data section, right? Meaning that the expectations for the latter should apply to the output of the former. Specifically:
If we have more expectations (for example: "an illustration could contain information indicating the expected solution"), we should add that. Furthermore, since we are discussing this, it is obviously not obvious, so we should definitely (I wanted to say "obviously") specify it one way or the other. |
So to clarify, there are three types of generated illustrations:
I'm a bit confused now about public illustrations:
But what is the expected use case of It seems that the public/private figure hinges more on whether the testcase is a sample, than what is rendered in the figure.
|
Sorry if I caused this confusion.
Correct.
Also correct. This would be the
It should be for all
If a tree falls...? Does it matter whether it's generated, if it's not used? This seems like an implementation detail of a system using the problem package.
Great question, that we have not answered (or even thought that much about). I would prefer if the answer is "yes". But a good argument can certainly be made for "no".
To judges/teachers? Maybe a choice could be made to show
Good point. 👍
But this would be hints that are not conveyed by getting both |
Maybe something like: the figure illustrates the steps of Dijkstra's algorithm towards finding a shortest path, rather than just showing the shortest path. So you would show the solution to the team, but not the way the solution is obtained.
Makes sense 👍 I don't have strong opinions on this, but I think it would be good to make a little list of some usecases we want to support and what exactly their requirements are. E.g., does one ever want to actually generate both teamimage and judgeimage at the same time? Otherwise, this could also be a setting in problem.yaml ( |
This is also somewhat related to my comment in #393. If output validators get access to |
To aid in the discussion, RagnarGrootKoerkamp/BAPCtools#438 implements the visualizers as they are currently written in the draft:
|
Could we specify this as "same interface as input validators"? Would it make sense to give it the same arguments as the input validator?
Where does it write them. In the same directory?
👍
👍 |
Sure, we can make it have the same interface (it's already the same in BAPCtools, except We could draw even more parallels and allow any input validator to write image files, just like the output validator is allowed to do so. Additionally, we could split up
BAPCtools creates and validates the test cases in |
We went over this before, but probably good to quickly state again how we use. I think as follows but probably I'm wrong at least once:
So visualizers would write to |
Close! 😄 I also double-checked again, and apparently, we don't have a Note that the above three points only hold for the input visualizer, the output visualizer (currently) follows the same flow as the output validator:
|
Huh, input visualizers write to CWD, and output visualizers write to the feedbackdir? That's weird/inconsistent. |
In the input stage, there is no feedback_dir yet, because the concept of "feedback" doesn't really exist there, right? In the output stage, the visualization is actually "feedback" 🙂 |
@mpsijm @RagnarGrootKoerkamp Where are we with this? Could we get a PR maybe, or is there still disagreement? |
My PR at BAPCtools is still not finished yet (other things keep popping up 😅). There's a list of TODOs at RagnarGrootKoerkamp/BAPCtools#438. I tried to write a summary of my current thoughts in the list below. Most of these are implementation details, but some things should be updated in the spec. For completeness, the points that I also commented at https://github.com/RagnarGrootKoerkamp/BAPCtools/pull/438:
|
After some discussion with BAPCtool-people and playing around with the developing implementation on the Test case visualiserThere should be two visualisers. One is called the test case visualizer, it resides in Here’s an example of a test case with a possible solution for BAPC2024:levellinglocks. It is, in fact, Here’s an example of a test case “without solution” for WCFD24:alcohol. In fact, Output visualiserThe other is called output visualizer and placed in ArgumentsThe files test_case_visualizer_args?: *"" | string
output_viusalizer_args?: *"" | string This is particularly useful for flags like |
Agreed with all of the above, thanks for the summary! 😄 Probably, your mentions of populating the image files to |
Yes, my formulations
and
were sufficiently broad to allow a problem development framework (be it parts of BAPCtools or testdatatools or your mom’s bash scripts) to do what they want. In extremis, I am fine with not mentioning test case visualisers at all in the problem package format specification. |
I would expect an example for the output_visualizer in the
maximal
problem. This is currently missing. Can this be added before the draft becomes official?The text was updated successfully, but these errors were encountered: