Skip to content

Commit

Permalink
fix: bug in disentangled VQA
Browse files Browse the repository at this point in the history
  • Loading branch information
soumik12345 committed Oct 30, 2024
1 parent 2e9915a commit cccdcf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions hemm/metrics/vqa/disentangled_vqa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict

import weave

Expand Down Expand Up @@ -38,19 +38,9 @@ class DisentangledVQAMetric(weave.Scorer):
Args:
judge (Union[weave.Model, BlipVQAJudge]): The judge model to evaluate the attribute-binding capability.
name (Optional[str]): The name of the metric. Defaults to "disentangled_vlm_metric".
"""

def __init__(
self,
judge: Union[weave.Model, BlipVQAJudge],
name: Optional[str] = "disentangled_vlm_metric",
) -> None:
super().__init__()
self.judge = judge
self.config = self.judge.model_dump()
self.scores = []
self.name = name
judge: BlipVQAJudge

@weave.op()
def score(
Expand Down
2 changes: 1 addition & 1 deletion hemm/tests/test_disentangled_vqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from hemm.models import DiffusersModel


def test_desentangled_vqa_evaluation():
def test_disentangled_vqa_evaluation():
weave.init(project_name="hemm-eval/unit-tests")
model = DiffusersModel(
diffusion_model_name_or_path="CompVis/stable-diffusion-v1-4",
Expand Down

0 comments on commit cccdcf5

Please sign in to comment.