Skip to content

Commit 8a66339

Browse files
authored
Deprecate Obsolete Config Properties (#433)
* Deprecate obsolete config properties.
1 parent a2c7ac2 commit 8a66339

File tree

3 files changed

+1
-2475
lines changed

3 files changed

+1
-2475
lines changed

src/lighteval/metrics/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
import re
2423

2524
from lighteval.metrics.metrics import Metric, MetricCategory
2625
from lighteval.models.model_output import ModelResponse
@@ -89,7 +88,6 @@ def apply_generative_metric( # noqa: C901
8988
responses: list[list[ModelResponse]],
9089
formatted_docs: list[Doc],
9190
metrics: list[Metric],
92-
output_regex: str = None,
9391
):
9492
outputs = []
9593

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

115113
for pred_raw in preds_raw:
116-
if output_regex is not None:
117-
pred = next(iter(re.findall(output_regex, pred_raw)), "")
118-
else:
119-
pred = pred_raw
114+
pred = pred_raw
120115
preds.append(pred)
121116

122117
for metric in metrics:

0 commit comments

Comments
 (0)