Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#24] Fix for LocalEvaluator not calling superclass parameter setter. #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/fmcore/framework/_evaluator/LocalEvaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from bears import FileMetadata
from bears.util import Timeout, Timeout24Hr, Timer, confloat, get_default, safe_validate_arguments
from pydantic import model_validator

from fmcore.framework._algorithm import Algorithm
from fmcore.framework._evaluator.Evaluator import Evaluator
Expand All @@ -27,6 +28,12 @@ class LocalEvaluator(Evaluator):
## Cache model locally for 15 mins:
cache_timeout: Optional[Union[Timeout, confloat(gt=0)]] = Timeout24Hr(timeout=3 * 60 * 60)

@model_validator(mode="before")
@classmethod
def set_local_evaluator_params(cls, params: Dict) -> Dict:
params: Dict = cls._set_common_evaluator_params(params)
return params

def _load_model(
self,
*,
Expand Down