Skip to content

Commit

Permalink
SAM2: Rerun batch size 1 experiments on latest nightly (#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpuhrsch authored Jan 10, 2025
1 parent 9c2635b commit 79979ec
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 75 deletions.
3 changes: 0 additions & 3 deletions examples/sam2_amg_server/compile_export_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,6 @@ def load_exported_model(
def set_fast(
mask_generator, task_type, loaded_exported_model=False, allow_recompiles=True
):
if task_type == "":
task_type = "amg"

assert task_type in TASK_TYPES, f"Expected {task_type} to be one of {TASK_TYPES}"
if not loaded_exported_model:
# TODO: Using CUDA graphs can cause numerical differences?
Expand Down
4 changes: 4 additions & 0 deletions examples/sam2_amg_server/reproduce_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import fire
import pandas as pd
import torch
import torchvision
from compare_rle_lists import compare as compare_folders


Expand Down Expand Up @@ -130,6 +132,8 @@ def run(task, output_path: Path, kwargs, baseline_folder=None, environ=None):
all_stats["task"] = task
all_stats["experiment_name"] = output_path.name
all_stats["environ"] = str(environ)
all_stats["torch_version"] = str(torch.__version__)
all_stats["torchvision_version"] = str(torchvision.__version__)
all_stats = all_stats | {key: str(kwargs[key]) for key in kwargs}
if not overwrite and all_stats_file.exists():
raise ValueError(
Expand Down
Loading

0 comments on commit 79979ec

Please sign in to comment.