Shaltiel commited on
Commit
c911bc5
·
1 Parent(s): 3f6926c

Updated config patch

Browse files
Files changed (1) hide show
  1. main_backend_lighteval.py +5 -5
main_backend_lighteval.py CHANGED
@@ -11,11 +11,11 @@ class GoodInferenceEndpointModel(lighteval.models.endpoint_model.InferenceEndpoi
11
  pass
12
  lighteval.models.endpoint_model.InferenceEndpointModel = GoodInferenceEndpointModel
13
 
14
- class PatchedInferenceEndpointModelConfig(lighteval.models.endpoint_model.InferenceEndpointModelConfig):
15
- def __post_init__(self):
16
- self.name = self.name.replace('.', '_')
17
- lighteval.models.endpoint_model.InferenceEndpointModelConfig = PatchedInferenceEndpointModelConfig
18
-
19
 
20
  from src.backend.run_eval_suite_lighteval import run_evaluation
21
  from src.backend.manage_requests import check_completed_evals, get_eval_requests, set_eval_request
 
11
  pass
12
  lighteval.models.endpoint_model.InferenceEndpointModel = GoodInferenceEndpointModel
13
 
14
+ orig_init = lighteval.models.endpoint_model.InferenceEndpointModelConfig.__init__
15
+ def patched_init(self, *args, **kwargs):
16
+ orig_init(self, *args, **kwargs)
17
+ self.name = self.name.replace('.', '_')
18
+ lighteval.models.endpoint_model.InferenceEndpointModelConfig.__init__ = patched_init
19
 
20
  from src.backend.run_eval_suite_lighteval import run_evaluation
21
  from src.backend.manage_requests import check_completed_evals, get_eval_requests, set_eval_request