Skip to content

Commit

Permalink
Add missing DEFAULT_TRAIN_BSIZE field
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrowskimarcin committed Jan 13, 2025
1 parent 9028c93 commit e6fde3b
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions torchbenchmark/models/doctr_det_predictor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
class Model(BenchmarkModel):
task = COMPUTER_VISION.DETECTION
DEFAULT_EVAL_BSIZE = 1
DEFAULT_TRAIN_BSIZE = 1
CANNOT_SET_CUSTOM_OPTIMIZER = True

def __init__(self, test, device, batch_size=None, extra_args=[]):
Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/models/doctr_reco_predictor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
class Model(BenchmarkModel):
task = COMPUTER_VISION.DETECTION
DEFAULT_EVAL_BSIZE = 1
DEFAULT_TRAIN_BSIZE = 1
CANNOT_SET_CUSTOM_OPTIMIZER = True

def __init__(self, test, device, batch_size=None, extra_args=[]):
Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/models/llama/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
class Model(BenchmarkModel):
task = NLP.LANGUAGE_MODELING
DEFAULT_EVAL_BSIZE = 32
DEFAULT_TRAIN_BSIZE = 32

def __init__(self, test, device, batch_size=None, extra_args=[]):
super().__init__(
Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/models/pyhpc_equation_of_state/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Model(BenchmarkModel):
# Source: https://github.com/dionhaefner/pyhpc-benchmarks/blob/650ecc650e394df829944ffcf09e9d646ec69691/run.py#L25
# Pick data point: i = 20, size = 1048576
DEFAULT_EVAL_BSIZE = 1048576
DEFAULT_TRAIN_BSIZE = 1048576
CANNOT_SET_CUSTOM_OPTIMIZER = True

def __init__(self, test, device, batch_size=None, extra_args=[]):
Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/models/pyhpc_isoneutral_mixing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class Model(BenchmarkModel):
# Source: https://github.com/dionhaefner/pyhpc-benchmarks/blob/650ecc650e394df829944ffcf09e9d646ec69691/run.py#L25
# Pick data-point when i = 20, size = 1048576
DEFAULT_EVAL_BSIZE = 1048576
DEFAULT_TRAIN_BSIZE = 1048576
CANNOT_SET_CUSTOM_OPTIMIZER = True

def __init__(self, test, device, batch_size=None, extra_args=[]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class Model(BenchmarkModel):
# Source: https://github.com/dionhaefner/pyhpc-benchmarks/blob/650ecc650e394df829944ffcf09e9d646ec69691/run.py#L25
# Pick data-point when i = 20, size = 1048576
DEFAULT_EVAL_BSIZE = 1048576
DEFAULT_TRAIN_BSIZE = 1048576
ALLOW_CUSTOMIZE_BSIZE = False
CANNOT_SET_CUSTOM_OPTIMIZER = True

Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/models/sam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
class Model(BenchmarkModel):
task = COMPUTER_VISION.SEGMENTATION
DEFAULT_EVAL_BSIZE = 32
DEFAULT_TRAIN_BSIZE = 32

def __init__(self, test, device, batch_size=1, extra_args=[]):
super().__init__(
Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/models/sam_fast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
class Model(BenchmarkModel):
task = COMPUTER_VISION.SEGMENTATION
DEFAULT_EVAL_BSIZE = 32
DEFAULT_TRAIN_BSIZE = 32

def __init__(self, test, device, batch_size=1, extra_args=[]):
super().__init__(
Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/models/simple_gpt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
class Model(BenchmarkModel):
task = NLP.GENERATION
DEFAULT_EVAL_BSIZE = 1
DEFAULT_TRAIN_BSIZE = 1

def validate_environment(self):
if not torch.cuda.is_available() or "cuda" not in self.device:
Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/models/simple_gpt_tp_manual/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class Model(BenchmarkModel):
task = NLP.GENERATION
DEFAULT_EVAL_BSIZE = 1
DEFAULT_TRAIN_BSIZE = 1

def validate_environment(self):
if not torch.cuda.is_available() or "cuda" not in self.device:
Expand Down
1 change: 1 addition & 0 deletions torchbenchmark/util/framework/huggingface/model_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def __init__(self):
class HuggingFaceGenerationModel(HuggingFaceModel):
task = NLP.GENERATION
DEFAULT_EVAL_BSIZE = 1
DEFAULT_TRAIN_BSIZE = 1

"""
Instead of just running __call__ on the model, use generate to generate
Expand Down

0 comments on commit e6fde3b

Please sign in to comment.