Skip to content

Commit

Permalink
Update voir version to 0.2.8 (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Delaunay authored May 4, 2023
1 parent 1eb4887 commit 0c5c00e
Show file tree
Hide file tree
Showing 28 changed files with 49 additions and 32 deletions.
2 changes: 1 addition & 1 deletion benchmarks/_template/requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
voir>=0.2.5,<0.3
voir>=0.2.8,<0.3
2 changes: 1 addition & 1 deletion benchmarks/accelerate_opt/requirements.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.6
voir==0.2.8
# via -r benchmarks/accelerate_opt/requirements.in
xxhash==3.2.0
# via
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/accelerate_opt/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ accelerate
deepspeed
rich
asyncssh
voir>=0.2.4,<0.3
voir>=0.2.8,<0.3
2 changes: 1 addition & 1 deletion benchmarks/accelerate_opt/requirements.rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.5
voir==0.2.8
# via -r benchmarks/accelerate_opt/requirements.in
xxhash==3.2.0
# via
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/dlrm/requirements.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.6
voir==0.2.8
# via -r benchmarks/dlrm/requirements.in
websocket-client==1.5.1
# via
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/dlrm/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ torchx
tensorboard

# Following limits are for milabench
voir>=0.2.4,<0.3
voir>=0.2.8,<0.3
2 changes: 1 addition & 1 deletion benchmarks/dlrm/requirements.rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.5
voir==0.2.8
# via -r benchmarks/dlrm/requirements.in
websocket-client==1.5.1
# via
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/huggingface/requirements.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.6
voir==0.2.8
# via -r benchmarks/huggingface/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/huggingface/requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
torch
transformers
voir>=0.2.5,<0.3
voir>=0.2.8,<0.3
2 changes: 1 addition & 1 deletion benchmarks/huggingface/requirements.rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.5
voir==0.2.8
# via -r benchmarks/huggingface/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/stable_baselines3/requirements.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ urllib3==1.26.15
# sentry-sdk
varname==0.10.0
# via giving
voir==0.2.6
voir==0.2.8
# via -r benchmarks/stable_baselines3/requirements.in
wandb==0.14.0
# via -r benchmarks/stable_baselines3/requirements.in
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/stable_baselines3/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ seaborn
tqdm

# Following limits are for milabench
voir>=0.2.5,<0.3.0
voir>=0.2.8,<0.3.0
2 changes: 1 addition & 1 deletion benchmarks/stable_baselines3/requirements.rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ urllib3==1.26.15
# sentry-sdk
varname==0.10.0
# via giving
voir==0.2.5
voir==0.2.8
# via -r benchmarks/stable_baselines3/requirements.in
wandb==0.14.0
# via -r benchmarks/stable_baselines3/requirements.in
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/stargan/requirements.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.6
voir==0.2.8
# via -r benchmarks/stargan/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/stargan/requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy
torch
torchvision
voir>=0.2.4,<0.3
voir>=0.2.8,<0.3
2 changes: 1 addition & 1 deletion benchmarks/stargan/requirements.rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.5
voir==0.2.8
# via -r benchmarks/stargan/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/super-slomo/requirements.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.6
voir==0.2.8
# via -r benchmarks/super-slomo/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/super-slomo/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ numpy
tqdm
opencv-python

voir>=0.2.4,<0.3
voir>=0.2.8,<0.3
2 changes: 1 addition & 1 deletion benchmarks/super-slomo/requirements.rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.5
voir==0.2.8
# via -r benchmarks/super-slomo/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/timm/requirements.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.6
voir==0.2.8
# via -r benchmarks/timm/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/timm/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ torchvision
pyyaml
huggingface_hub
safetensors>=0.2
voir>=0.2.5,<0.3
voir>=0.2.8,<0.3
2 changes: 1 addition & 1 deletion benchmarks/timm/requirements.rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.5
voir==0.2.8
# via -r benchmarks/timm/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/torchvision/requirements.cuda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.6
voir==0.2.8
# via -r benchmarks/torchvision/requirements.in
2 changes: 1 addition & 1 deletion benchmarks/torchvision/requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
torch
torchvision
tqdm
voir>=0.2.5,<0.3
voir>=0.2.8,<0.3
2 changes: 1 addition & 1 deletion benchmarks/torchvision/requirements.rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,5 @@ varname==0.10.0
# via
# -c .pin-constraints-torch.txt
# giving
voir==0.2.5
voir==0.2.8
# via -r benchmarks/torchvision/requirements.in
27 changes: 22 additions & 5 deletions milabench/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from coleo import Option, config as configuration, default, run_cli, tooled
from omegaconf import OmegaConf
from voir.instruments.gpu import get_gpu_info
from voir.instruments.gpu import deduce_backend, get_gpu_info, select_backend

from milabench.alt_async import proceed
from milabench.utils import blabla
Expand Down Expand Up @@ -138,6 +138,22 @@ def get_base_defaults(base, arch="none", run_name="none"):
}


def deduce_arch():
"""Deduce the arch for installation and preparation purposes"""
arch_guess = os.environ.get("MILABENCH_GPU_ARCH", None)

if arch_guess is not None:
return arch_guess

return deduce_backend()


def init_arch():
"""Initialize the monitor for the given arch"""
arch = deduce_arch()
return select_backend(arch)


def _get_multipack(
config_path,
base=None,
Expand Down Expand Up @@ -177,15 +193,13 @@ def _get_multipack(
sys.exit(1)
overrides = merge(overrides, {"*": {"dirs": {"venv": venv}}})

arch_guess = os.environ.get("MILABENCH_GPU_ARCH", None)
arch = get_gpu_info(arch_guess)["arch"]

if run_name is None:
run_name = blabla() + ".{time}"

now = str(datetime.today()).replace(" ", "_")
run_name = run_name.format(time=now)

base_defaults = get_base_defaults(base=base, arch=arch, run_name=run_name)
base_defaults = get_base_defaults(base=base, arch=deduce_arch(), run_name=run_name)

config = build_config(base_defaults, config_path, overrides)

Expand Down Expand Up @@ -305,6 +319,9 @@ def run():

mp = get_multipack(run_name=run_name)

# Initialize the backend here so we can retrieve GPU stats
init_arch()

success = run_with_loggers(
mp.do_run(repeat=repeat),
loggers=[
Expand Down
2 changes: 1 addition & 1 deletion milabench/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from contextlib import asynccontextmanager, contextmanager
from dataclasses import dataclass
from itertools import count
from typing import List, Dict
from typing import Dict, List

from voir.proc import LogEntry

Expand Down
2 changes: 1 addition & 1 deletion tests/yoshua-benchio/requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
voir>=0.2.5,<0.3
voir>=0.2.8,<0.3

0 comments on commit 0c5c00e

Please sign in to comment.