Skip to content

Commit

Permalink
moving tests to a tests/ dir. changing workload base class names to s…
Browse files Browse the repository at this point in the history
…tart with Base. making acronyms in workloads camel case.
  • Loading branch information
znado committed Mar 29, 2022
1 parent 10bd7fe commit 071d1e3
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Run pytest
run: |
pytest -vx .
pytest -vx tests/
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def cycle(iterable):
iterator = iter(iterable)


class ImagenetPytorchWorkload(BaseImagenetWorkload):
class ImagenetWorkload(BaseImagenetWorkload):

@property
def param_shapes(self):
Expand Down
4 changes: 2 additions & 2 deletions algorithmic_efficiency/workloads/ogbg/ogbg_jax/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

from algorithmic_efficiency import random_utils as prng
from algorithmic_efficiency import spec
from algorithmic_efficiency.workloads.ogbg.workload import BaseOgbgWorkload
from algorithmic_efficiency.workloads.ogbg.ogbg_jax import input_pipeline
from algorithmic_efficiency.workloads.ogbg.ogbg_jax import metrics
from algorithmic_efficiency.workloads.ogbg.ogbg_jax import models
from algorithmic_efficiency.workloads.ogbg.workload import OGBG


class OGBGWorkload(OGBG):
class OgbgWorkload(BaseOgbgWorkload):

def __init__(self):
self._eval_iterator = None
Expand Down
2 changes: 1 addition & 1 deletion algorithmic_efficiency/workloads/ogbg/workload.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from algorithmic_efficiency import spec


class OGBG(spec.Workload):
class BaseOgbgWorkload(spec.Workload):

def has_reached_goal(self, eval_result: float) -> bool:
return eval_result['mean_average_precision'] > self.target_value
Expand Down
2 changes: 1 addition & 1 deletion algorithmic_efficiency/workloads/wmt/wmt_jax/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
WORKDIR = "./wmt_256"


class WMTWorkload(spec.Workload):
class WmtWorkload(spec.Workload):
"""A WMT workload."""

def __init__(self):
Expand Down
6 changes: 3 additions & 3 deletions submission_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# TODO(znado): make a nicer registry of workloads that lookup in.
BASE_WORKLOADS_DIR = "algorithmic_efficiency/workloads/"

# workload_path will be appended by '_pytorch' or '_jax' automatically
# workload_path will be appended by '_pytorch' or '_jax' automatically.
WORKLOADS = {
'mnist': {
'workload_path': 'mnist/mnist', 'workload_class_name': 'MnistWorkload'
Expand All @@ -43,13 +43,13 @@
'workload_path': 'imagenet/imagenet',
'workload_class_name': 'ImagenetWorkload'
},
'wmt': {'workload_path': 'wmt/wmt', 'workload_class_name': 'WMTWorkload'},
'wmt': {'workload_path': 'wmt/wmt', 'workload_class_name': 'WmtWorkload'},
'librispeech': {
'workload_path': 'librispeech/librispeech',
'workload_class_name': 'LibriSpeechWorkload'
},
'ogbg': {
'workload_path': 'ogbg/ogbg', 'workload_class_name': 'OGBGWorkload'
'workload_path': 'ogbg/ogbg', 'workload_class_name': 'OgbgWorkload'
},
}

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 071d1e3

Please sign in to comment.