This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
import platform
|
||||
import tracemalloc
|
||||
@@ -58,7 +59,7 @@ def _percentile(values: list[float], p: float) -> float:
|
||||
if not values:
|
||||
return 0.0
|
||||
ordered = sorted(values)
|
||||
index = round((len(ordered) - 1) * p / 100)
|
||||
index = max(0, math.ceil(len(ordered) * p / 100) - 1)
|
||||
return ordered[index]
|
||||
|
||||
|
||||
@@ -98,7 +99,7 @@ class BenchmarkArtifact:
|
||||
|
||||
def _load_text(path: Path) -> str:
|
||||
_is_supported_file_path(path)
|
||||
return path.read_text(encoding="utf-8")
|
||||
return path.read_text(encoding="utf-8-sig")
|
||||
|
||||
|
||||
def load_benchmark_dataset(path: Path) -> dict[str, Any]:
|
||||
@@ -297,8 +298,6 @@ def _create_seed_jobs(
|
||||
)
|
||||
job = JobPosting.objects.create(
|
||||
employer=employer,
|
||||
requirements=payload["job"]["requirements"],
|
||||
benefits=payload["job"]["benefits"],
|
||||
description_html_sanitized=payload["job"]["description_text"],
|
||||
extraction_confidence=Decimal("0.95"),
|
||||
analysis_features={},
|
||||
|
||||
Reference in New Issue
Block a user