Skip to content

Commit

Permalink
update: examples
Browse files Browse the repository at this point in the history
  • Loading branch information
soumik12345 committed Oct 8, 2024
1 parent ec47f92 commit 185669a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion examples/multimodal_llm_eval/evaluate_mllm_metric_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def main(
dataset_limit: Optional[int] = None,
diffusion_model_address: str = "stabilityai/stable-diffusion-2-1",
diffusion_model_enable_cpu_offfload: bool = False,
openai_judge_model: str = "gpt-4o",
image_height: int = 1024,
image_width: int = 1024,
num_inference_steps: int = 50,
Expand All @@ -37,7 +38,9 @@ def main(
diffusion_model._pipeline.set_progress_bar_config(disable=True)
evaluation_pipeline = EvaluationPipeline(model=diffusion_model)

judge = OpenAIJudge(prompt_property=PromptCategory.action)
judge = OpenAIJudge(
prompt_property=PromptCategory.action, openai_model=openai_judge_model
)
metric = MultiModalLLMEvaluationMetric(judge=judge)
evaluation_pipeline.add_metric(metric)

Expand Down
2 changes: 1 addition & 1 deletion hemm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def autogenerate_seed(set_to_max: bool = False) -> int:
return seed


def custom_wrapper(name: str) -> Callable[[Callable], Callable]:
def custom_weave_wrapper(name: str) -> Callable[[Callable], Callable]:
def wrapper(fn: Callable) -> Callable:
op = weave.op()(fn)
op.name = name # type: ignore
Expand Down

0 comments on commit 185669a

Please sign in to comment.