Skip to content

Commit

Permalink
Merge branch 'main' into wandb-state-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MsRandom authored Oct 22, 2024
2 parents 0b63b48 + 5e0bb3f commit e0b03c9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pytype-miner.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Test Miner Types

on:
pull_request:
types:
- opened
- pull_request
- workflow_dispatch

jobs:
test-types:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pytype-neuron.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Test Common Types

on:
pull_request:
types:
- opened
- pull_request
- workflow_dispatch

jobs:
test-types:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pytype-validator.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Test Validator Types

on:
pull_request:
types:
- opened
- pull_request
- workflow_dispatch

jobs:
test-types:
Expand Down
4 changes: 2 additions & 2 deletions neuron/neuron/contest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from enum import Enum
from functools import partial
from io import BytesIO
from typing import ContextManager

from pydantic import BaseModel
from transformers import CLIPProcessor, CLIPVisionModelWithProjection
Expand All @@ -19,7 +20,7 @@ class ContestId(Enum):
FLUX_NVIDIA_4090 = 2


class OutputComparator(ABC):
class OutputComparator(ContextManager, ABC):
@abstractmethod
def compare(self, baseline: bytes, optimized: bytes) -> float:
pass
Expand Down Expand Up @@ -87,7 +88,6 @@ def __exit__(self, exc_type, exc_value, traceback):
getattr(torch, self.device).empty_cache()



class Contest(ABC):
id: ContestId
output_comparator: Callable[[], OutputComparator]
Expand Down
5 changes: 4 additions & 1 deletion validator/base_validator/metrics.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from enum import Enum

from neuron import Key
from neuron.submission_tester.metrics import *
from neuron.submission_tester.metrics import * # noqa
from neuron.submission_tester.metrics import CheckpointBenchmark, MetricData

from pydantic import BaseModel


class BenchmarkState(Enum):
Expand Down

0 comments on commit e0b03c9

Please sign in to comment.