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

Replace modal.Mount( with suggested fix #288

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions swebench/harness/modal_eval/run_evaluation_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,12 @@ def _get_sandbox(self, timeout: int | None = None):
timeout = 60 * 30

return modal.Sandbox.create(
image=self.image,
image=self.image.add_local_file(
REMOTE_SANDBOX_ENTRYPOINT_PATH,
REMOTE_SANDBOX_ENTRYPOINT_PATH,
),
timeout=timeout,
cpu=4,
mounts=[
modal.Mount.from_local_file(
REMOTE_SANDBOX_ENTRYPOINT_PATH,
REMOTE_SANDBOX_ENTRYPOINT_PATH,
)
],
)

async def _read_stream(self, stream: modal.io_streams.StreamReader, output_list: list[str]):
Expand Down Expand Up @@ -303,13 +300,10 @@ def get_log_dir(pred: dict, run_id: str, instance_id: str) -> Path:
return RUN_EVALUATION_LOG_DIR / run_id / model_name_or_path / instance_id

@app.function(
image=swebench_image,
mounts=[
modal.Mount.from_local_file(
LOCAL_SANDBOX_ENTRYPOINT_PATH,
REMOTE_SANDBOX_ENTRYPOINT_PATH,
)
],
image=swebench_image.add_local_file(
LOCAL_SANDBOX_ENTRYPOINT_PATH,
REMOTE_SANDBOX_ENTRYPOINT_PATH,
),
timeout=120*60, # Much larger than default timeout to account for image build time
)
def run_instance_modal(
Expand Down
Loading