Skip to content

Commit

Permalink
Deprecate Obsolete Config Properties (#433)
Browse files Browse the repository at this point in the history
* Deprecate obsolete config properties.
  • Loading branch information
ParagEkbote authored Dec 11, 2024
1 parent f2e1f69 commit 6ad7276
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2,475 deletions.
7 changes: 1 addition & 6 deletions src/lighteval/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import re

from lighteval.metrics.metrics import Metric, MetricCategory
from lighteval.models.model_output import ModelResponse
Expand Down Expand Up @@ -89,7 +88,6 @@ def apply_generative_metric( # noqa: C901
responses: list[list[ModelResponse]],
formatted_docs: list[Doc],
metrics: list[Metric],
output_regex: str = None,
):
outputs = []

Expand All @@ -113,10 +111,7 @@ def apply_generative_metric( # noqa: C901
preds = []

for pred_raw in preds_raw:
if output_regex is not None:
pred = next(iter(re.findall(output_regex, pred_raw)), "")
else:
pred = pred_raw
pred = pred_raw
preds.append(pred)

for metric in metrics:
Expand Down
Loading

0 comments on commit 6ad7276

Please sign in to comment.