Skip to content
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

Support for interactive tasks via IO #233

Closed
wants to merge 16 commits into from
Closed

Conversation

MasloMaslane
Copy link
Member

@MasloMaslane MasloMaslane commented Apr 5, 2024

TODO:

  • support in oiejq
  • cache handling
  • don't run outgen
  • refactor

@adespawn
Copy link
Contributor

adespawn commented Apr 5, 2024

Maybe some support for two or more execution interactive tasks?

@MasloMaslane
Copy link
Member Author

Could you explain a bit more what you mean by that?

@adespawn
Copy link
Contributor

adespawn commented Apr 5, 2024

Currently I'm aware of 2 implementation of what I call multi-phase (or Encoder-decoder) interactive tasks : sio2project/oioioi#191 and Stowarzyszenie-Talent/sioworkers@b9948b8 . I don't know anything about the implementation for OI, but sometimes I create tasks using the second implementation. It would be nice if sinol-make have some support for those type of tasks. Either by formalizing the format of those tasks and implementing it into sinol-make, or for ex. allowing to create custom bash script that simulate the execution on the sio and are run by sinol-make instead of binary.
Now I realize this is not related to IO interactive tasks, but just to the interactive tasks... It's hard for me to tell which of the options would be better for OI and related competitions (or even if it will be needed at all) but if you would prefer the second option, I could look into it next week.

@adespawn
Copy link
Contributor

adespawn commented Apr 5, 2024

And I said something without looking into the code. And there is the the task_type interface you just implemented, that could support what I just said...

@MasloMaslane
Copy link
Member Author

We are currently working on a new task type (sio2project/oioioi#287). It's similar to current interactive tasks with a library - the solution and checker(/interactor) have connected stdins and stdouts via pipes

file_no_ext = paths.get_executions_path(name, package_util.extract_test_id(test, self.ID))
output_file = file_no_ext + ".out"
result_file = file_no_ext + ".res"
hard_time_limit_in_s = math.ceil(2 * time_limit / 1000.0)
hard_time_limit = math.ceil(2 * time_limit / 1000.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this 2 times time limit in any way tested to be enough? I have an example, where sio2jail runs 1.5 times longer than time measured by the jail. If not, given "worse" program or slower machine, this hard time limit may be exceeded, without exceeding time_limit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work well in real sioworkers. But I guess on some systems it may fail

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be another discrepancy between upstream sioworkers and those on sio2.mimuw, but the first repo contains a multiplier of 16 with an additional second, see here and here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I didn't know about this. On sio2.mimuw we also have 16x time limit for sio2jail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants