# Generated by SnakeBridge v0.14.0 - DO NOT EDIT MANUALLY # Regenerate with: mix compile # Library: dspy 3.1.2 # Python module: dspy.datasets.math # Python class: MATH defmodule Dspy.Datasets.MATH do @moduledoc """ Wrapper for Python class MATH. """ def __snakebridge_python_name__, do: "dspy.datasets.math" def __snakebridge_python_class__, do: "MATH" def __snakebridge_library__, do: "dspy" @opaque t :: SnakeBridge.Ref.t() @doc """ Initialize self. See help(type(self)) for accurate signature. ## Parameters - `subset` (term()) """ @spec new(term(), keyword()) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()} def new(subset, opts \\ []) do SnakeBridge.Runtime.call_class(__MODULE__, :__init__, [subset], opts) end @doc """ Python method `MATH.metric`. ## Parameters - `example` (term()) - `pred` (term()) - `trace` (term() default: None) ## Returns - `term()` """ @spec metric(SnakeBridge.Ref.t(), term(), term(), list(term()), keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()} def metric(ref, example, pred, args, opts \\ []) do {args, opts} = SnakeBridge.Runtime.normalize_args_opts(args, opts) SnakeBridge.Runtime.call_method(ref, :metric, [example, pred] ++ List.wrap(args), opts) end end