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

Get modal working + simplify ExecutionContext class #29

Merged
merged 14 commits into from
Sep 16, 2024
Merged

Conversation

justinchiu-cohere
Copy link
Contributor

@justinchiu-cohere justinchiu-cohere commented Sep 16, 2024

Changes

Modal

  1. Creates and destructs modal.Sandbox within Modal.exec_with_timeout, allowing us to better control timeout.
  2. Write report.json in Modal.exec_with_timeout
  3. Issues only a single command to the sandbox: exec eval.sh + copy report.json to mount /vol
  4. Return duration in exec

ExecutionContext

  1. Remove helper functions that are not shared between Docker and Modal subclasses
  2. Changed ExecutionContext.write_test_output to only write the test output to a log

Docker

  1. Write report.json in Docker.exec_with_timeout
  2. Remove unused helper functions

Remaining todos

  1. Check for timeout in modal
  2. Handle stdout/stderr the same way as docker

@justinchiu-cohere justinchiu-cohere changed the title [Draft] get modal working Get modal working + simplify ExecutionContext class Sep 16, 2024
@wenting-zhao
Copy link
Collaborator

Changes

Modal

  1. Creates and destructs modal.Sandbox within Modal.exec_with_timeout, allowing us to better control timeout.
  2. Write report.json in Modal.exec_with_timeout
  3. Issues only a single command to the sandbox: exec eval.sh + copy report.json to mount /vol
  4. Return duration in exec

ExecutionContext

  1. Remove helper functions that are not shared between Docker and Modal subclasses
  2. Changed ExecutionContext.write_test_output to only write the test output to a log

Docker

  1. Write report.json in Docker.exec_with_timeout
  2. Remove unused helper functions

Remaining todos

  1. Check for timeout in modal
  2. Handle stdout/stderr the same way as docker

I handled the todos, they now worked.

@wenting-zhao wenting-zhao merged commit 88d8526 into main Sep 16, 2024
2 checks passed
@wenting-zhao wenting-zhao deleted the modal-fix branch September 22, 2024 17:38
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.

2 participants