Vik Paruchuri
commited on
Commit
·
5a3e7f6
1
Parent(s):
49af83e
Clean up benchmarks
Browse files- README.md +2 -2
- benchmarks/overall/inference.py +39 -39
- benchmarks/overall/overall.py +66 -41
- benchmarks/overall/schema.py +15 -0
- benchmarks/overall/scoring.py +124 -19
- benchmarks/table/table.py +1 -0
- marker/processors/llm/llm_complex.py +1 -1
- marker/processors/llm/llm_handwriting.py +1 -1
- marker/renderers/markdown.py +9 -5
- poetry.lock +151 -181
- pyproject.toml +1 -2
README.md
CHANGED
|
@@ -219,11 +219,11 @@ rendered = converter("FILEPATH")
|
|
| 219 |
text, _, images = text_from_rendered(rendered)
|
| 220 |
```
|
| 221 |
|
| 222 |
-
This takes all the same configuration as the PdfConverter. You can specify the configuration
|
| 223 |
|
| 224 |
You can also run this via the CLI with
|
| 225 |
```shell
|
| 226 |
-
|
| 227 |
```
|
| 228 |
|
| 229 |
# Output Formats
|
|
|
|
| 219 |
text, _, images = text_from_rendered(rendered)
|
| 220 |
```
|
| 221 |
|
| 222 |
+
This takes all the same configuration as the PdfConverter. You can specify the configuration `force_layout_block=Table` to avoid layout detection and instead assume every page is a table. Set `output_format=json` to also get cell bounding boxes.
|
| 223 |
|
| 224 |
You can also run this via the CLI with
|
| 225 |
```shell
|
| 226 |
+
marker_single FILENAME --use_llm --force_layout_block Table --converter_cls marker.converters.table.TableConverter --output_format json
|
| 227 |
```
|
| 228 |
|
| 229 |
# Output Formats
|
benchmarks/overall/inference.py
CHANGED
|
@@ -1,47 +1,47 @@
|
|
| 1 |
-
import
|
| 2 |
-
|
| 3 |
-
import fitz as pymupdf
|
| 4 |
import tempfile
|
| 5 |
from bs4 import BeautifulSoup
|
| 6 |
|
|
|
|
|
|
|
| 7 |
from marker.converters.pdf import PdfConverter
|
| 8 |
|
| 9 |
-
def
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
def clip_pdf_to_bbox(doc, bbox, padding=1):
|
| 14 |
-
page = doc[0]
|
| 15 |
-
height, width = page.bound().height, page.bound().width
|
| 16 |
-
remove_left = [0, 0, bbox[0] - padding, height]
|
| 17 |
-
remove_top = [0, 0, width, bbox[1] - padding]
|
| 18 |
-
remove_right = [bbox[2] + padding, 0, width, height]
|
| 19 |
-
remove_bottom = [0, bbox[3] + padding, width, height]
|
| 20 |
-
for remove in [remove_left, remove_top, remove_right, remove_bottom]:
|
| 21 |
-
clip_rect = pymupdf.Rect(*remove)
|
| 22 |
-
page.add_redact_annot(clip_rect)
|
| 23 |
-
page.apply_redactions()
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
for block in gt_blocks
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
clip_pdf_to_bbox(doc2, bbox)
|
| 35 |
-
block_converter = PdfConverter(
|
| 36 |
-
artifact_dict=marker_models,
|
| 37 |
-
config={"page_range": [0], "force_layout_block": block["block_type"], "disable_tqdm": True},
|
| 38 |
-
renderer="marker.renderers.html.HTMLRenderer"
|
| 39 |
-
)
|
| 40 |
-
with tempfile.NamedTemporaryFile(suffix=".pdf", mode="wb") as f:
|
| 41 |
-
doc2.save(f)
|
| 42 |
-
rendered = block_converter(f.name)
|
| 43 |
-
html = rendered.html
|
| 44 |
-
soup = BeautifulSoup(html, "html.parser")
|
| 45 |
-
inner_html = str(soup.find("body").decode_contents())
|
| 46 |
-
block_html.append(inner_html)
|
| 47 |
-
return block_html
|
|
|
|
| 1 |
+
import json
|
|
|
|
|
|
|
| 2 |
import tempfile
|
| 3 |
from bs4 import BeautifulSoup
|
| 4 |
|
| 5 |
+
from benchmarks.overall.scoring import score_blocks
|
| 6 |
+
from benchmarks.overall.schema import BlockScores
|
| 7 |
from marker.converters.pdf import PdfConverter
|
| 8 |
|
| 9 |
+
def get_marker_html(marker_models: dict, pdf_bytes: bytes):
|
| 10 |
+
block_converter = PdfConverter(
|
| 11 |
+
artifact_dict=marker_models,
|
| 12 |
+
config={"page_range": [0], "disable_tqdm": True},
|
| 13 |
+
renderer="marker.renderers.html.HTMLRenderer"
|
| 14 |
+
)
|
| 15 |
+
with tempfile.NamedTemporaryFile(suffix=".pdf", mode="wb") as f:
|
| 16 |
+
f.write(pdf_bytes)
|
| 17 |
+
rendered = block_converter(f.name)
|
| 18 |
+
html = rendered.html
|
| 19 |
+
soup = BeautifulSoup(html, "html.parser")
|
| 20 |
+
inner_html = str(soup.find("body").decode_contents())
|
| 21 |
+
return inner_html
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def marker_html_func(model_dict, sample, **kwargs) -> BlockScores:
|
| 25 |
+
gt_blocks = json.loads(sample["gt_blocks"])
|
| 26 |
+
pdf_bytes = sample["pdf"] # This is a single page PDF
|
| 27 |
+
marker_html = get_marker_html(model_dict, pdf_bytes)
|
| 28 |
+
gt_html = [block["html"] for block in gt_blocks]
|
| 29 |
+
scores = score_blocks(gt_html, marker_html)
|
| 30 |
+
return scores
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
def mathpix_html_func(model_dict, sample, mathpix_ds, **kwargs) -> BlockScores:
|
| 34 |
+
uuid = sample["uuid"]
|
| 35 |
+
data = None
|
| 36 |
+
for row in mathpix_ds:
|
| 37 |
+
if str(row["uuid"]) == str(uuid):
|
| 38 |
+
data = row
|
| 39 |
+
break
|
| 40 |
+
if not data:
|
| 41 |
+
raise ValueError(f"Could not find data for uuid {uuid}")
|
| 42 |
|
| 43 |
+
mathpix_md = data["md"]
|
| 44 |
+
gt_blocks = json.loads(sample["gt_blocks"])
|
| 45 |
+
gt_html = [block["html"] for block in gt_blocks]
|
| 46 |
+
scores = score_blocks(gt_html, mathpix_md, convert=False)
|
| 47 |
+
return scores
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
benchmarks/overall/overall.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import json
|
| 2 |
import os
|
|
|
|
| 3 |
from collections import defaultdict
|
| 4 |
from pathlib import Path
|
| 5 |
|
|
@@ -8,64 +9,53 @@ import datasets
|
|
| 8 |
import tabulate
|
| 9 |
from tqdm import tqdm
|
| 10 |
|
|
|
|
|
|
|
| 11 |
from marker.logger import configure_logging
|
| 12 |
from marker.models import create_model_dict
|
| 13 |
-
from inference import get_marker_block_html
|
| 14 |
from marker.settings import settings
|
| 15 |
-
from scoring import score_blocks
|
| 16 |
|
| 17 |
configure_logging()
|
| 18 |
|
| 19 |
-
@click.command(help="Benchmark PDF to MD conversion.")
|
| 20 |
-
@click.option("--dataset", type=str, help="Path to the benchmark dataset", default="datalab-to/marker_benchmark")
|
| 21 |
-
@click.option("--other_methods", type=str, help="Comma separated list of other methods to compare against. Possible values:", default="")
|
| 22 |
-
@click.option("--result_path", type=str, default=os.path.join(settings.OUTPUT_DIR, "benchmark", "overall"), help="Output path for results.")
|
| 23 |
-
@click.option("--max_rows", type=int, default=None, help="Maximum number of rows to process.")
|
| 24 |
-
def main(
|
| 25 |
-
dataset: str,
|
| 26 |
-
other_methods: str,
|
| 27 |
-
result_path: str,
|
| 28 |
-
max_rows: int
|
| 29 |
-
):
|
| 30 |
-
allowed_methods = [""]
|
| 31 |
-
methods = other_methods.split(",")
|
| 32 |
-
for method in methods:
|
| 33 |
-
if method not in allowed_methods:
|
| 34 |
-
raise ValueError(f"Method {method} not allowed. Allowed methods are {allowed_methods}")
|
| 35 |
-
|
| 36 |
-
model_dict = create_model_dict()
|
| 37 |
-
ds = datasets.load_dataset(dataset, split="train")
|
| 38 |
|
|
|
|
| 39 |
bench_scores = {}
|
| 40 |
averages_by_type = defaultdict(list)
|
| 41 |
averages_by_block_type = defaultdict(list)
|
| 42 |
for idx, sample in tqdm(enumerate(ds), desc="Running benchmark"):
|
|
|
|
|
|
|
|
|
|
| 43 |
gt_blocks = json.loads(sample["gt_blocks"])
|
| 44 |
doc_type = sample["classification"]
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
"weights": gt_weights,
|
| 54 |
-
"overall_score": overall_score # Weighted score, weighted by length of GT block
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
averages_by_type[doc_type].append(overall_score)
|
| 58 |
-
|
| 59 |
-
for score, gt_block in zip(scores, gt_blocks):
|
| 60 |
averages_by_block_type[gt_block["block_type"]].append(score)
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
for k in averages_by_type:
|
| 66 |
averages_by_type[k] = sum(averages_by_type[k]) / len(averages_by_type[k])
|
| 67 |
averages_by_type = sorted(averages_by_type.items())
|
| 68 |
|
|
|
|
| 69 |
print(tabulate.tabulate(averages_by_type, headers=["Document Type", "Average Score"], tablefmt="github"))
|
| 70 |
|
| 71 |
for k in averages_by_block_type:
|
|
@@ -76,10 +66,45 @@ def main(
|
|
| 76 |
|
| 77 |
overall_average = sum([bench_scores[k]["overall_score"] for k in bench_scores]) / len(bench_scores)
|
| 78 |
print(tabulate.tabulate([["Overall Average", overall_average]], tablefmt="github"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
out_path = Path(result_path)
|
| 81 |
-
|
| 82 |
-
|
|
|
|
| 83 |
|
| 84 |
print(f"Results saved to {out_path}.")
|
| 85 |
|
|
|
|
| 1 |
import json
|
| 2 |
import os
|
| 3 |
+
import traceback
|
| 4 |
from collections import defaultdict
|
| 5 |
from pathlib import Path
|
| 6 |
|
|
|
|
| 9 |
import tabulate
|
| 10 |
from tqdm import tqdm
|
| 11 |
|
| 12 |
+
from benchmarks.overall.inference import marker_html_func, mathpix_html_func
|
| 13 |
+
from benchmarks.overall.schema import FullResult
|
| 14 |
from marker.logger import configure_logging
|
| 15 |
from marker.models import create_model_dict
|
|
|
|
| 16 |
from marker.settings import settings
|
|
|
|
| 17 |
|
| 18 |
configure_logging()
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
def get_method_scores(ds, model_dict, max_rows=None, html_func=marker_html_func, **kwargs) -> FullResult:
|
| 22 |
bench_scores = {}
|
| 23 |
averages_by_type = defaultdict(list)
|
| 24 |
averages_by_block_type = defaultdict(list)
|
| 25 |
for idx, sample in tqdm(enumerate(ds), desc="Running benchmark"):
|
| 26 |
+
if max_rows is not None and idx >= max_rows:
|
| 27 |
+
break
|
| 28 |
+
|
| 29 |
gt_blocks = json.loads(sample["gt_blocks"])
|
| 30 |
doc_type = sample["classification"]
|
| 31 |
+
try:
|
| 32 |
+
scores = html_func(model_dict, sample, **kwargs)
|
| 33 |
+
except ValueError as e:
|
| 34 |
+
print(f"Error with sample {idx}: {e}")
|
| 35 |
+
continue
|
| 36 |
+
averages_by_type[doc_type].append(scores["overall_score"])
|
| 37 |
+
|
| 38 |
+
for score, gt_block in zip(scores["scores"], gt_blocks):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
averages_by_block_type[gt_block["block_type"]].append(score)
|
| 40 |
|
| 41 |
+
bench_scores[idx] = scores
|
| 42 |
+
|
| 43 |
+
return {
|
| 44 |
+
"raw_scores": bench_scores,
|
| 45 |
+
"averages_by_type": averages_by_type,
|
| 46 |
+
"averages_by_block_type": averages_by_block_type
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
def print_scores(scores: FullResult, method: str):
|
| 50 |
+
averages_by_type = scores["averages_by_type"]
|
| 51 |
+
averages_by_block_type = scores["averages_by_block_type"]
|
| 52 |
+
bench_scores = scores["raw_scores"]
|
| 53 |
|
| 54 |
for k in averages_by_type:
|
| 55 |
averages_by_type[k] = sum(averages_by_type[k]) / len(averages_by_type[k])
|
| 56 |
averages_by_type = sorted(averages_by_type.items())
|
| 57 |
|
| 58 |
+
print(f"Scores for method {method}:")
|
| 59 |
print(tabulate.tabulate(averages_by_type, headers=["Document Type", "Average Score"], tablefmt="github"))
|
| 60 |
|
| 61 |
for k in averages_by_block_type:
|
|
|
|
| 66 |
|
| 67 |
overall_average = sum([bench_scores[k]["overall_score"] for k in bench_scores]) / len(bench_scores)
|
| 68 |
print(tabulate.tabulate([["Overall Average", overall_average]], tablefmt="github"))
|
| 69 |
+
print()
|
| 70 |
+
|
| 71 |
+
@click.command(help="Benchmark PDF to MD conversion.")
|
| 72 |
+
@click.option("--dataset", type=str, help="Path to the benchmark dataset", default="datalab-to/marker_benchmark")
|
| 73 |
+
@click.option("--other_methods", type=str, help="Comma separated list of other methods to compare against. Possible values: mathpix", default="")
|
| 74 |
+
@click.option("--result_path", type=str, default=os.path.join(settings.OUTPUT_DIR, "benchmark", "overall"), help="Output path for results.")
|
| 75 |
+
@click.option("--max_rows", type=int, default=None, help="Maximum number of rows to process.")
|
| 76 |
+
def main(
|
| 77 |
+
dataset: str,
|
| 78 |
+
other_methods: str,
|
| 79 |
+
result_path: str,
|
| 80 |
+
max_rows: int
|
| 81 |
+
):
|
| 82 |
+
allowed_methods = ["mathpix", ""]
|
| 83 |
+
methods = other_methods.split(",")
|
| 84 |
+
for method in methods:
|
| 85 |
+
if method not in allowed_methods:
|
| 86 |
+
raise ValueError(f"Method {method} not allowed. Allowed methods are {allowed_methods}")
|
| 87 |
+
|
| 88 |
+
model_dict = create_model_dict()
|
| 89 |
+
ds = datasets.load_dataset(dataset, split="train")
|
| 90 |
+
|
| 91 |
+
marker_scores = get_method_scores(ds, model_dict, max_rows=max_rows)
|
| 92 |
+
all_scores = {
|
| 93 |
+
"marker": marker_scores
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
if "mathpix" in methods:
|
| 97 |
+
mathpix_ds = datasets.load_dataset("datalab-to/marker_benchmark_mathpix", split="train")
|
| 98 |
+
mathpix_scores = get_method_scores(ds, model_dict, max_rows=max_rows, html_func=mathpix_html_func, mathpix_ds=mathpix_ds)
|
| 99 |
+
all_scores["mathpix"] = mathpix_scores
|
| 100 |
+
|
| 101 |
+
for k,v in all_scores.items():
|
| 102 |
+
print_scores(v, k)
|
| 103 |
|
| 104 |
+
out_path = Path(result_path)
|
| 105 |
+
out_path.mkdir(parents=True, exist_ok=True)
|
| 106 |
+
with open(out_path / "overall.json", "w") as f:
|
| 107 |
+
json.dump(all_scores, f, indent=2)
|
| 108 |
|
| 109 |
print(f"Results saved to {out_path}.")
|
| 110 |
|
benchmarks/overall/schema.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import TypedDict, List, Dict
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class BlockScores(TypedDict):
|
| 5 |
+
scores: List[float]
|
| 6 |
+
order_score: float
|
| 7 |
+
gt: List[str]
|
| 8 |
+
method: str
|
| 9 |
+
overall_score: float
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class FullResult(TypedDict):
|
| 13 |
+
raw_scores: Dict[int, BlockScores]
|
| 14 |
+
averages_by_type: Dict[str, List[float]]
|
| 15 |
+
averages_by_block_type: Dict[str, List[float]]
|
benchmarks/overall/scoring.py
CHANGED
|
@@ -1,30 +1,135 @@
|
|
| 1 |
-
import
|
| 2 |
-
from bs4 import BeautifulSoup
|
| 3 |
|
| 4 |
-
from markdownify import markdownify as md
|
| 5 |
from rapidfuzz import fuzz
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
html = str(soup)
|
| 15 |
-
markdown = md(html)
|
| 16 |
markdown = markdown.replace("<br>", "\n")
|
|
|
|
|
|
|
|
|
|
| 17 |
markdown = re.sub(r"\s+", " ", markdown)
|
| 18 |
markdown = re.sub(r"\n+", "\n", markdown)
|
| 19 |
markdown = re.sub("\\.+", ".", markdown) # Replace repeated periods with a single period, like in table of contents
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
|
|
|
| 2 |
|
|
|
|
| 3 |
from rapidfuzz import fuzz
|
| 4 |
|
| 5 |
+
from benchmarks.overall.schema import BlockScores
|
| 6 |
+
from marker.renderers.markdown import MarkdownRenderer
|
| 7 |
+
import re
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def kendall_tau(correct_order: List[int], actual_order: List[int]) -> float:
|
| 11 |
+
n = len(correct_order)
|
| 12 |
+
concordant = 0
|
| 13 |
+
discordant = 0
|
| 14 |
+
|
| 15 |
+
for i in range(n):
|
| 16 |
+
for j in range(i + 1, n):
|
| 17 |
+
correct_sign = correct_order[i] - correct_order[j]
|
| 18 |
+
actual_sign = actual_order[i] - actual_order[j]
|
| 19 |
+
|
| 20 |
+
if (correct_sign > 0 and actual_sign > 0) or (correct_sign < 0 and actual_sign < 0):
|
| 21 |
+
concordant += 1
|
| 22 |
+
elif (correct_sign < 0 and actual_sign > 0) or (correct_sign > 0 and actual_sign < 0):
|
| 23 |
+
discordant += 1
|
| 24 |
+
|
| 25 |
+
total_pairs = (n * (n - 1)) // 2
|
| 26 |
+
tau = (concordant - discordant) / total_pairs
|
| 27 |
+
tau = (tau + 1) / 2 # 0-1 scale
|
| 28 |
+
return tau * 100 # 0-100 scale
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def find_fuzzy_alignments(
|
| 32 |
+
main_string: str,
|
| 33 |
+
substrings: List[str],
|
| 34 |
+
threshold: int = 70
|
| 35 |
+
) -> List[dict]:
|
| 36 |
+
alignments = []
|
| 37 |
+
|
| 38 |
+
for idx, substr in enumerate(substrings):
|
| 39 |
+
result = fuzz.partial_ratio_alignment(substr, main_string, score_cutoff=threshold)
|
| 40 |
+
|
| 41 |
+
score = 0
|
| 42 |
+
dest_start = 0
|
| 43 |
+
dest_end = 0
|
| 44 |
+
if result:
|
| 45 |
+
score = result.score
|
| 46 |
+
dest_start = result.dest_start
|
| 47 |
+
dest_end = result.dest_end
|
| 48 |
+
|
| 49 |
+
alignments.append({
|
| 50 |
+
"string": substr,
|
| 51 |
+
"start": dest_start,
|
| 52 |
+
"end": dest_end,
|
| 53 |
+
"score": score,
|
| 54 |
+
"idx": idx
|
| 55 |
+
})
|
| 56 |
+
return alignments
|
| 57 |
|
| 58 |
+
def convert_to_md(html):
|
| 59 |
+
md = MarkdownRenderer()
|
| 60 |
+
markdown = md.md_cls.convert(html)
|
| 61 |
+
return markdown
|
| 62 |
+
|
| 63 |
+
def standardize_markdown(markdown):
|
| 64 |
+
pattern = r'(?<!\\)\$(?:\$([^$]+)\$\$|\s*([^$\n]+?)\s*\$)'
|
| 65 |
+
markdown = re.sub(pattern, standardize_math, markdown)
|
| 66 |
|
|
|
|
|
|
|
| 67 |
markdown = markdown.replace("<br>", "\n")
|
| 68 |
+
markdown = re.sub(r"<sub>(.*?)</sub>", r"\1", markdown)
|
| 69 |
+
markdown = re.sub(r"<sup>(.*?)</sup>", r"\1", markdown)
|
| 70 |
+
|
| 71 |
markdown = re.sub(r"\s+", " ", markdown)
|
| 72 |
markdown = re.sub(r"\n+", "\n", markdown)
|
| 73 |
markdown = re.sub("\\.+", ".", markdown) # Replace repeated periods with a single period, like in table of contents
|
| 74 |
+
markdown = re.sub("#+", "#", markdown) # Replace repeated headers with a single header
|
| 75 |
+
markdown = re.sub(r"\$", "", markdown) # Remove equation delimiters
|
| 76 |
+
return markdown.strip().lower()
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
def standardize_math(match):
|
| 80 |
+
try:
|
| 81 |
+
delim = "$$" if match.group(0).startswith('$$') else "$"
|
| 82 |
+
math_content = match.group(1) or match.group(2)
|
| 83 |
+
result = clean_latex(math_content)
|
| 84 |
+
return f'{delim}{result}{delim}'
|
| 85 |
+
except Exception as e:
|
| 86 |
+
print(f"Failed to standardize math expression: {match.group(0)} with error: {e}")
|
| 87 |
+
return match.group(0)
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
def clean_latex(latex_str):
|
| 91 |
+
latex_str = re.sub(r'\s+', ' ', latex_str.strip())
|
| 92 |
+
for tag in [r'\\text', r'\\mathrm', r'\\mathbf', r'\\textbf']:
|
| 93 |
+
latex_str = re.sub(tag + r'\{([^}]+)\}', r'\1', latex_str)
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
replacements = {
|
| 97 |
+
'\\times': '*',
|
| 98 |
+
'\\cdot': '*',
|
| 99 |
+
'\\div': '/',
|
| 100 |
+
'\\le': '<=',
|
| 101 |
+
'\\ge': '>=',
|
| 102 |
+
'\\neq': '!=',
|
| 103 |
+
'\\to': '\\rightarrow',
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
for old, new in replacements.items():
|
| 107 |
+
latex_str = latex_str.replace(old, new)
|
| 108 |
+
|
| 109 |
+
return latex_str
|
| 110 |
+
|
| 111 |
|
| 112 |
+
def score_blocks(gt_html, method_html, convert=True) -> BlockScores:
|
| 113 |
+
if convert:
|
| 114 |
+
method_html = convert_to_md(method_html)
|
| 115 |
+
method_html = standardize_markdown(method_html)
|
| 116 |
+
gt = [standardize_markdown(convert_to_md(gt)) for gt in gt_html]
|
| 117 |
+
alignments = find_fuzzy_alignments(method_html, gt)
|
| 118 |
+
scores = [alignment["score"] for alignment in alignments]
|
| 119 |
+
orders = [alignment["start"] for alignment in alignments]
|
| 120 |
+
correct_order = range(len(gt))
|
| 121 |
+
actual_order = sorted(range(len(gt)), key=lambda x: orders[x])
|
| 122 |
+
order_score = kendall_tau(correct_order, actual_order)
|
| 123 |
+
gt_weights = [len(g) for g in gt]
|
| 124 |
+
weighted_scores = [score * weight for score, weight in zip(scores, gt_weights)]
|
| 125 |
|
| 126 |
+
# Weight the score by sequence length
|
| 127 |
+
overall_score = sum(weighted_scores) / max(1, sum(gt_weights))
|
| 128 |
+
overall_score = overall_score * 0.8 + order_score * 0.2
|
| 129 |
+
return {
|
| 130 |
+
"scores": scores,
|
| 131 |
+
"order_score": order_score,
|
| 132 |
+
"gt": gt,
|
| 133 |
+
"method": method_html,
|
| 134 |
+
"overall_score": overall_score
|
| 135 |
+
}
|
benchmarks/table/table.py
CHANGED
|
@@ -223,6 +223,7 @@ def main(
|
|
| 223 |
}
|
| 224 |
|
| 225 |
out_path = Path(result_path) / "table.json"
|
|
|
|
| 226 |
with open(out_path, "w+") as f:
|
| 227 |
json.dump(results, f, indent=2)
|
| 228 |
|
|
|
|
| 223 |
}
|
| 224 |
|
| 225 |
out_path = Path(result_path) / "table.json"
|
| 226 |
+
out_path.mkdir(parents=True, exist_ok=True)
|
| 227 |
with open(out_path, "w+") as f:
|
| 228 |
json.dump(results, f, indent=2)
|
| 229 |
|
marker/processors/llm/llm_complex.py
CHANGED
|
@@ -85,4 +85,4 @@ Output:
|
|
| 85 |
|
| 86 |
# Convert LLM markdown to html
|
| 87 |
corrected_markdown = corrected_markdown.strip().lstrip("```markdown").rstrip("```").strip()
|
| 88 |
-
block.html = markdown2.markdown(corrected_markdown)
|
|
|
|
| 85 |
|
| 86 |
# Convert LLM markdown to html
|
| 87 |
corrected_markdown = corrected_markdown.strip().lstrip("```markdown").rstrip("```").strip()
|
| 88 |
+
block.html = markdown2.markdown(corrected_markdown, extras=["tables"])
|
marker/processors/llm/llm_handwriting.py
CHANGED
|
@@ -72,4 +72,4 @@ Formatting should be in markdown, with the following rules:
|
|
| 72 |
return
|
| 73 |
|
| 74 |
markdown = markdown.strip().lstrip("```markdown").rstrip("```").strip()
|
| 75 |
-
block.html = markdown2.markdown(markdown)
|
|
|
|
| 72 |
return
|
| 73 |
|
| 74 |
markdown = markdown.strip().lstrip("```markdown").rstrip("```").strip()
|
| 75 |
+
block.html = markdown2.markdown(markdown, extras=["tables"])
|
marker/renderers/markdown.py
CHANGED
|
@@ -198,10 +198,9 @@ class MarkdownRenderer(HTMLRenderer):
|
|
| 198 |
inline_math_delimiters: Annotated[Tuple[str], "The delimiters to use for inline math."] = ("$", "$")
|
| 199 |
block_math_delimiters: Annotated[Tuple[str], "The delimiters to use for block math."] = ("$$", "$$")
|
| 200 |
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
md_cls = Markdownify(
|
| 205 |
self.paginate_output,
|
| 206 |
self.page_separator,
|
| 207 |
heading_style="ATX",
|
|
@@ -215,7 +214,12 @@ class MarkdownRenderer(HTMLRenderer):
|
|
| 215 |
inline_math_delimiters=self.inline_math_delimiters,
|
| 216 |
block_math_delimiters=self.block_math_delimiters
|
| 217 |
)
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
markdown = cleanup_text(markdown)
|
| 220 |
return MarkdownOutput(
|
| 221 |
markdown=markdown,
|
|
|
|
| 198 |
inline_math_delimiters: Annotated[Tuple[str], "The delimiters to use for inline math."] = ("$", "$")
|
| 199 |
block_math_delimiters: Annotated[Tuple[str], "The delimiters to use for block math."] = ("$$", "$$")
|
| 200 |
|
| 201 |
+
@property
|
| 202 |
+
def md_cls(self):
|
| 203 |
+
return Markdownify(
|
|
|
|
| 204 |
self.paginate_output,
|
| 205 |
self.page_separator,
|
| 206 |
heading_style="ATX",
|
|
|
|
| 214 |
inline_math_delimiters=self.inline_math_delimiters,
|
| 215 |
block_math_delimiters=self.block_math_delimiters
|
| 216 |
)
|
| 217 |
+
|
| 218 |
+
|
| 219 |
+
def __call__(self, document: Document) -> MarkdownOutput:
|
| 220 |
+
document_output = document.render()
|
| 221 |
+
full_html, images = self.extract_html(document, document_output)
|
| 222 |
+
markdown = self.md_cls.convert(full_html)
|
| 223 |
markdown = cleanup_text(markdown)
|
| 224 |
return MarkdownOutput(
|
| 225 |
markdown=markdown,
|
poetry.lock
CHANGED
|
@@ -801,13 +801,13 @@ tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipyth
|
|
| 801 |
|
| 802 |
[[package]]
|
| 803 |
name = "fastapi"
|
| 804 |
-
version = "0.115.
|
| 805 |
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
|
| 806 |
optional = false
|
| 807 |
python-versions = ">=3.8"
|
| 808 |
files = [
|
| 809 |
-
{file = "fastapi-0.115.
|
| 810 |
-
{file = "fastapi-0.115.
|
| 811 |
]
|
| 812 |
|
| 813 |
[package.dependencies]
|
|
@@ -1367,13 +1367,13 @@ zstd = ["zstandard (>=0.18.0)"]
|
|
| 1367 |
|
| 1368 |
[[package]]
|
| 1369 |
name = "huggingface-hub"
|
| 1370 |
-
version = "0.28.
|
| 1371 |
description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
|
| 1372 |
optional = false
|
| 1373 |
python-versions = ">=3.8.0"
|
| 1374 |
files = [
|
| 1375 |
-
{file = "huggingface_hub-0.28.
|
| 1376 |
-
{file = "huggingface_hub-0.28.
|
| 1377 |
]
|
| 1378 |
|
| 1379 |
[package.dependencies]
|
|
@@ -1826,13 +1826,13 @@ test = ["jupyter-server (>=2.0.0)", "pytest (>=7.0)", "pytest-jupyter[server] (>
|
|
| 1826 |
|
| 1827 |
[[package]]
|
| 1828 |
name = "jupyterlab"
|
| 1829 |
-
version = "4.3.
|
| 1830 |
description = "JupyterLab computational environment"
|
| 1831 |
optional = false
|
| 1832 |
python-versions = ">=3.8"
|
| 1833 |
files = [
|
| 1834 |
-
{file = "jupyterlab-4.3.
|
| 1835 |
-
{file = "jupyterlab-4.3.
|
| 1836 |
]
|
| 1837 |
|
| 1838 |
[package.dependencies]
|
|
@@ -2729,18 +2729,6 @@ files = [
|
|
| 2729 |
[package.dependencies]
|
| 2730 |
nvidia-nvjitlink-cu12 = "*"
|
| 2731 |
|
| 2732 |
-
[[package]]
|
| 2733 |
-
name = "nvidia-cusparselt-cu12"
|
| 2734 |
-
version = "0.6.2"
|
| 2735 |
-
description = "NVIDIA cuSPARSELt"
|
| 2736 |
-
optional = false
|
| 2737 |
-
python-versions = "*"
|
| 2738 |
-
files = [
|
| 2739 |
-
{file = "nvidia_cusparselt_cu12-0.6.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:067a7f6d03ea0d4841c85f0c6f1991c5dda98211f6302cb83a4ab234ee95bef8"},
|
| 2740 |
-
{file = "nvidia_cusparselt_cu12-0.6.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:df2c24502fd76ebafe7457dbc4716b2fec071aabaed4fb7691a201cde03704d9"},
|
| 2741 |
-
{file = "nvidia_cusparselt_cu12-0.6.2-py3-none-win_amd64.whl", hash = "sha256:0057c91d230703924c0422feabe4ce768841f9b4b44d28586b6f6d2eb86fbe70"},
|
| 2742 |
-
]
|
| 2743 |
-
|
| 2744 |
[[package]]
|
| 2745 |
name = "nvidia-nccl-cu12"
|
| 2746 |
version = "2.21.5"
|
|
@@ -3578,23 +3566,6 @@ files = [
|
|
| 3578 |
[package.extras]
|
| 3579 |
windows-terminal = ["colorama (>=0.4.6)"]
|
| 3580 |
|
| 3581 |
-
[[package]]
|
| 3582 |
-
name = "pymupdf"
|
| 3583 |
-
version = "1.25.2"
|
| 3584 |
-
description = "A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents."
|
| 3585 |
-
optional = false
|
| 3586 |
-
python-versions = ">=3.9"
|
| 3587 |
-
files = [
|
| 3588 |
-
{file = "pymupdf-1.25.2-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:59dea22b633cc4fc13670b4c5db50d71f8cd4f420814420f33ce47ddcb61e1f6"},
|
| 3589 |
-
{file = "pymupdf-1.25.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:e8b8a874497cd0deee89a6a4fb76a3a08173c8d39e88fc7cf715764ec5a243e9"},
|
| 3590 |
-
{file = "pymupdf-1.25.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f61e5cdb25b86eb28d34aa3557b49ecf9e361d5f5cd3b1660406f8f0bf813af7"},
|
| 3591 |
-
{file = "pymupdf-1.25.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ae8cfa7a97d78f813d286ecba32369059d88073edd1e5cf105f4cd0811f71925"},
|
| 3592 |
-
{file = "pymupdf-1.25.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:295505fe1ecb7c7b57d4124d373e207ea311d8e40bc7ac3016d8ec2d60b091e9"},
|
| 3593 |
-
{file = "pymupdf-1.25.2-cp39-abi3-win32.whl", hash = "sha256:b9488c8b82bb9be36fb13ee0c8d43b0ddcc50af83b61da01e6040413d9e67da6"},
|
| 3594 |
-
{file = "pymupdf-1.25.2-cp39-abi3-win_amd64.whl", hash = "sha256:1b4ca6f5780d319a08dff885a5a0e3585c5d7af04dcfa063c535b88371fd91c1"},
|
| 3595 |
-
{file = "pymupdf-1.25.2.tar.gz", hash = "sha256:9ea88ff1b3ccb359620f106a6fd5ba6877d959d21d78272052c3496ceede6eec"},
|
| 3596 |
-
]
|
| 3597 |
-
|
| 3598 |
[[package]]
|
| 3599 |
name = "pyparsing"
|
| 3600 |
version = "3.2.1"
|
|
@@ -3840,120 +3811,120 @@ files = [
|
|
| 3840 |
|
| 3841 |
[[package]]
|
| 3842 |
name = "pyzmq"
|
| 3843 |
-
version = "26.2.
|
| 3844 |
description = "Python bindings for 0MQ"
|
| 3845 |
optional = false
|
| 3846 |
python-versions = ">=3.7"
|
| 3847 |
files = [
|
| 3848 |
-
{file = "pyzmq-26.2.
|
| 3849 |
-
{file = "pyzmq-26.2.
|
| 3850 |
-
{file = "pyzmq-26.2.
|
| 3851 |
-
{file = "pyzmq-26.2.
|
| 3852 |
-
{file = "pyzmq-26.2.
|
| 3853 |
-
{file = "pyzmq-26.2.
|
| 3854 |
-
{file = "pyzmq-26.2.
|
| 3855 |
-
{file = "pyzmq-26.2.
|
| 3856 |
-
{file = "pyzmq-26.2.
|
| 3857 |
-
{file = "pyzmq-26.2.
|
| 3858 |
-
{file = "pyzmq-26.2.
|
| 3859 |
-
{file = "pyzmq-26.2.
|
| 3860 |
-
{file = "pyzmq-26.2.
|
| 3861 |
-
{file = "pyzmq-26.2.
|
| 3862 |
-
{file = "pyzmq-26.2.
|
| 3863 |
-
{file = "pyzmq-26.2.
|
| 3864 |
-
{file = "pyzmq-26.2.
|
| 3865 |
-
{file = "pyzmq-26.2.
|
| 3866 |
-
{file = "pyzmq-26.2.
|
| 3867 |
-
{file = "pyzmq-26.2.
|
| 3868 |
-
{file = "pyzmq-26.2.
|
| 3869 |
-
{file = "pyzmq-26.2.
|
| 3870 |
-
{file = "pyzmq-26.2.
|
| 3871 |
-
{file = "pyzmq-26.2.
|
| 3872 |
-
{file = "pyzmq-26.2.
|
| 3873 |
-
{file = "pyzmq-26.2.
|
| 3874 |
-
{file = "pyzmq-26.2.
|
| 3875 |
-
{file = "pyzmq-26.2.
|
| 3876 |
-
{file = "pyzmq-26.2.
|
| 3877 |
-
{file = "pyzmq-26.2.
|
| 3878 |
-
{file = "pyzmq-26.2.
|
| 3879 |
-
{file = "pyzmq-26.2.
|
| 3880 |
-
{file = "pyzmq-26.2.
|
| 3881 |
-
{file = "pyzmq-26.2.
|
| 3882 |
-
{file = "pyzmq-26.2.
|
| 3883 |
-
{file = "pyzmq-26.2.
|
| 3884 |
-
{file = "pyzmq-26.2.
|
| 3885 |
-
{file = "pyzmq-26.2.
|
| 3886 |
-
{file = "pyzmq-26.2.
|
| 3887 |
-
{file = "pyzmq-26.2.
|
| 3888 |
-
{file = "pyzmq-26.2.
|
| 3889 |
-
{file = "pyzmq-26.2.
|
| 3890 |
-
{file = "pyzmq-26.2.
|
| 3891 |
-
{file = "pyzmq-26.2.
|
| 3892 |
-
{file = "pyzmq-26.2.
|
| 3893 |
-
{file = "pyzmq-26.2.
|
| 3894 |
-
{file = "pyzmq-26.2.
|
| 3895 |
-
{file = "pyzmq-26.2.
|
| 3896 |
-
{file = "pyzmq-26.2.
|
| 3897 |
-
{file = "pyzmq-26.2.
|
| 3898 |
-
{file = "pyzmq-26.2.
|
| 3899 |
-
{file = "pyzmq-26.2.
|
| 3900 |
-
{file = "pyzmq-26.2.
|
| 3901 |
-
{file = "pyzmq-26.2.
|
| 3902 |
-
{file = "pyzmq-26.2.
|
| 3903 |
-
{file = "pyzmq-26.2.
|
| 3904 |
-
{file = "pyzmq-26.2.
|
| 3905 |
-
{file = "pyzmq-26.2.
|
| 3906 |
-
{file = "pyzmq-26.2.
|
| 3907 |
-
{file = "pyzmq-26.2.
|
| 3908 |
-
{file = "pyzmq-26.2.
|
| 3909 |
-
{file = "pyzmq-26.2.
|
| 3910 |
-
{file = "pyzmq-26.2.
|
| 3911 |
-
{file = "pyzmq-26.2.
|
| 3912 |
-
{file = "pyzmq-26.2.
|
| 3913 |
-
{file = "pyzmq-26.2.
|
| 3914 |
-
{file = "pyzmq-26.2.
|
| 3915 |
-
{file = "pyzmq-26.2.
|
| 3916 |
-
{file = "pyzmq-26.2.
|
| 3917 |
-
{file = "pyzmq-26.2.
|
| 3918 |
-
{file = "pyzmq-26.2.
|
| 3919 |
-
{file = "pyzmq-26.2.
|
| 3920 |
-
{file = "pyzmq-26.2.
|
| 3921 |
-
{file = "pyzmq-26.2.
|
| 3922 |
-
{file = "pyzmq-26.2.
|
| 3923 |
-
{file = "pyzmq-26.2.
|
| 3924 |
-
{file = "pyzmq-26.2.
|
| 3925 |
-
{file = "pyzmq-26.2.
|
| 3926 |
-
{file = "pyzmq-26.2.
|
| 3927 |
-
{file = "pyzmq-26.2.
|
| 3928 |
-
{file = "pyzmq-26.2.
|
| 3929 |
-
{file = "pyzmq-26.2.
|
| 3930 |
-
{file = "pyzmq-26.2.
|
| 3931 |
-
{file = "pyzmq-26.2.
|
| 3932 |
-
{file = "pyzmq-26.2.
|
| 3933 |
-
{file = "pyzmq-26.2.
|
| 3934 |
-
{file = "pyzmq-26.2.
|
| 3935 |
-
{file = "pyzmq-26.2.
|
| 3936 |
-
{file = "pyzmq-26.2.
|
| 3937 |
-
{file = "pyzmq-26.2.
|
| 3938 |
-
{file = "pyzmq-26.2.
|
| 3939 |
-
{file = "pyzmq-26.2.
|
| 3940 |
-
{file = "pyzmq-26.2.
|
| 3941 |
-
{file = "pyzmq-26.2.
|
| 3942 |
-
{file = "pyzmq-26.2.
|
| 3943 |
-
{file = "pyzmq-26.2.
|
| 3944 |
-
{file = "pyzmq-26.2.
|
| 3945 |
-
{file = "pyzmq-26.2.
|
| 3946 |
-
{file = "pyzmq-26.2.
|
| 3947 |
-
{file = "pyzmq-26.2.
|
| 3948 |
-
{file = "pyzmq-26.2.
|
| 3949 |
-
{file = "pyzmq-26.2.
|
| 3950 |
-
{file = "pyzmq-26.2.
|
| 3951 |
-
{file = "pyzmq-26.2.
|
| 3952 |
-
{file = "pyzmq-26.2.
|
| 3953 |
-
{file = "pyzmq-26.2.
|
| 3954 |
-
{file = "pyzmq-26.2.
|
| 3955 |
-
{file = "pyzmq-26.2.
|
| 3956 |
-
{file = "pyzmq-26.2.
|
| 3957 |
]
|
| 3958 |
|
| 3959 |
[package.dependencies]
|
|
@@ -4873,31 +4844,28 @@ files = [
|
|
| 4873 |
|
| 4874 |
[[package]]
|
| 4875 |
name = "torch"
|
| 4876 |
-
version = "2.
|
| 4877 |
description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration"
|
| 4878 |
optional = false
|
| 4879 |
-
python-versions = ">=3.
|
| 4880 |
files = [
|
| 4881 |
-
{file = "torch-2.
|
| 4882 |
-
{file = "torch-2.
|
| 4883 |
-
{file = "torch-2.
|
| 4884 |
-
{file = "torch-2.
|
| 4885 |
-
{file = "torch-2.
|
| 4886 |
-
{file = "torch-2.
|
| 4887 |
-
{file = "torch-2.
|
| 4888 |
-
{file = "torch-2.
|
| 4889 |
-
{file = "torch-2.
|
| 4890 |
-
{file = "torch-2.
|
| 4891 |
-
{file = "torch-2.
|
| 4892 |
-
{file = "torch-2.
|
| 4893 |
-
{file = "torch-2.
|
| 4894 |
-
{file = "torch-2.
|
| 4895 |
-
{file = "torch-2.
|
| 4896 |
-
{file = "torch-2.
|
| 4897 |
-
{file = "torch-2.
|
| 4898 |
-
{file = "torch-2.6.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:bb2c6c3e65049f081940f5ab15c9136c7de40d3f01192541c920a07c7c585b7e"},
|
| 4899 |
-
{file = "torch-2.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:683410f97984103148e31b38a8631acf31c3034c020c0f4d26171e7626d8317a"},
|
| 4900 |
-
{file = "torch-2.6.0-cp39-none-macosx_11_0_arm64.whl", hash = "sha256:265f70de5fd45b864d924b64be1797f86e76c8e48a02c2a3a6fc7ec247d2226c"},
|
| 4901 |
]
|
| 4902 |
|
| 4903 |
[package.dependencies]
|
|
@@ -4914,18 +4882,17 @@ nvidia-cufft-cu12 = {version = "11.2.1.3", markers = "platform_system == \"Linux
|
|
| 4914 |
nvidia-curand-cu12 = {version = "10.3.5.147", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4915 |
nvidia-cusolver-cu12 = {version = "11.6.1.9", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4916 |
nvidia-cusparse-cu12 = {version = "12.3.1.170", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4917 |
-
nvidia-cusparselt-cu12 = {version = "0.6.2", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4918 |
nvidia-nccl-cu12 = {version = "2.21.5", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4919 |
nvidia-nvjitlink-cu12 = {version = "12.4.127", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4920 |
nvidia-nvtx-cu12 = {version = "12.4.127", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4921 |
setuptools = {version = "*", markers = "python_version >= \"3.12\""}
|
| 4922 |
sympy = {version = "1.13.1", markers = "python_version >= \"3.9\""}
|
| 4923 |
-
triton = {version = "3.
|
| 4924 |
-
typing-extensions = ">=4.
|
| 4925 |
|
| 4926 |
[package.extras]
|
| 4927 |
opt-einsum = ["opt-einsum (>=3.3)"]
|
| 4928 |
-
optree = ["optree (>=0.
|
| 4929 |
|
| 4930 |
[[package]]
|
| 4931 |
name = "tornado"
|
|
@@ -5054,18 +5021,21 @@ vision = ["Pillow (>=10.0.1,<=15.0)"]
|
|
| 5054 |
|
| 5055 |
[[package]]
|
| 5056 |
name = "triton"
|
| 5057 |
-
version = "3.
|
| 5058 |
description = "A language and compiler for custom Deep Learning operations"
|
| 5059 |
optional = false
|
| 5060 |
python-versions = "*"
|
| 5061 |
files = [
|
| 5062 |
-
{file = "triton-3.
|
| 5063 |
-
{file = "triton-3.
|
| 5064 |
-
{file = "triton-3.
|
| 5065 |
-
{file = "triton-3.
|
| 5066 |
-
{file = "triton-3.
|
| 5067 |
]
|
| 5068 |
|
|
|
|
|
|
|
|
|
|
| 5069 |
[package.extras]
|
| 5070 |
build = ["cmake (>=3.20)", "lit"]
|
| 5071 |
tests = ["autopep8", "flake8", "isort", "llnl-hatchet", "numpy", "pytest", "scipy (>=1.7.1)"]
|
|
@@ -5498,4 +5468,4 @@ propcache = ">=0.2.0"
|
|
| 5498 |
[metadata]
|
| 5499 |
lock-version = "2.0"
|
| 5500 |
python-versions = "^3.10"
|
| 5501 |
-
content-hash = "
|
|
|
|
| 801 |
|
| 802 |
[[package]]
|
| 803 |
name = "fastapi"
|
| 804 |
+
version = "0.115.8"
|
| 805 |
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
|
| 806 |
optional = false
|
| 807 |
python-versions = ">=3.8"
|
| 808 |
files = [
|
| 809 |
+
{file = "fastapi-0.115.8-py3-none-any.whl", hash = "sha256:753a96dd7e036b34eeef8babdfcfe3f28ff79648f86551eb36bfc1b0bf4a8cbf"},
|
| 810 |
+
{file = "fastapi-0.115.8.tar.gz", hash = "sha256:0ce9111231720190473e222cdf0f07f7206ad7e53ea02beb1d2dc36e2f0741e9"},
|
| 811 |
]
|
| 812 |
|
| 813 |
[package.dependencies]
|
|
|
|
| 1367 |
|
| 1368 |
[[package]]
|
| 1369 |
name = "huggingface-hub"
|
| 1370 |
+
version = "0.28.1"
|
| 1371 |
description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
|
| 1372 |
optional = false
|
| 1373 |
python-versions = ">=3.8.0"
|
| 1374 |
files = [
|
| 1375 |
+
{file = "huggingface_hub-0.28.1-py3-none-any.whl", hash = "sha256:aa6b9a3ffdae939b72c464dbb0d7f99f56e649b55c3d52406f49e0a5a620c0a7"},
|
| 1376 |
+
{file = "huggingface_hub-0.28.1.tar.gz", hash = "sha256:893471090c98e3b6efbdfdacafe4052b20b84d59866fb6f54c33d9af18c303ae"},
|
| 1377 |
]
|
| 1378 |
|
| 1379 |
[package.dependencies]
|
|
|
|
| 1826 |
|
| 1827 |
[[package]]
|
| 1828 |
name = "jupyterlab"
|
| 1829 |
+
version = "4.3.5"
|
| 1830 |
description = "JupyterLab computational environment"
|
| 1831 |
optional = false
|
| 1832 |
python-versions = ">=3.8"
|
| 1833 |
files = [
|
| 1834 |
+
{file = "jupyterlab-4.3.5-py3-none-any.whl", hash = "sha256:571bbdee20e4c5321ab5195bc41cf92a75a5cff886be5e57ce78dfa37a5e9fdb"},
|
| 1835 |
+
{file = "jupyterlab-4.3.5.tar.gz", hash = "sha256:c779bf72ced007d7d29d5bcef128e7fdda96ea69299e19b04a43635a7d641f9d"},
|
| 1836 |
]
|
| 1837 |
|
| 1838 |
[package.dependencies]
|
|
|
|
| 2729 |
[package.dependencies]
|
| 2730 |
nvidia-nvjitlink-cu12 = "*"
|
| 2731 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2732 |
[[package]]
|
| 2733 |
name = "nvidia-nccl-cu12"
|
| 2734 |
version = "2.21.5"
|
|
|
|
| 3566 |
[package.extras]
|
| 3567 |
windows-terminal = ["colorama (>=0.4.6)"]
|
| 3568 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3569 |
[[package]]
|
| 3570 |
name = "pyparsing"
|
| 3571 |
version = "3.2.1"
|
|
|
|
| 3811 |
|
| 3812 |
[[package]]
|
| 3813 |
name = "pyzmq"
|
| 3814 |
+
version = "26.2.1"
|
| 3815 |
description = "Python bindings for 0MQ"
|
| 3816 |
optional = false
|
| 3817 |
python-versions = ">=3.7"
|
| 3818 |
files = [
|
| 3819 |
+
{file = "pyzmq-26.2.1-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:f39d1227e8256d19899d953e6e19ed2ccb689102e6d85e024da5acf410f301eb"},
|
| 3820 |
+
{file = "pyzmq-26.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a23948554c692df95daed595fdd3b76b420a4939d7a8a28d6d7dea9711878641"},
|
| 3821 |
+
{file = "pyzmq-26.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95f5728b367a042df146cec4340d75359ec6237beebf4a8f5cf74657c65b9257"},
|
| 3822 |
+
{file = "pyzmq-26.2.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:95f7b01b3f275504011cf4cf21c6b885c8d627ce0867a7e83af1382ebab7b3ff"},
|
| 3823 |
+
{file = "pyzmq-26.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80a00370a2ef2159c310e662c7c0f2d030f437f35f478bb8b2f70abd07e26b24"},
|
| 3824 |
+
{file = "pyzmq-26.2.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:8531ed35dfd1dd2af95f5d02afd6545e8650eedbf8c3d244a554cf47d8924459"},
|
| 3825 |
+
{file = "pyzmq-26.2.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:cdb69710e462a38e6039cf17259d328f86383a06c20482cc154327968712273c"},
|
| 3826 |
+
{file = "pyzmq-26.2.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e7eeaef81530d0b74ad0d29eec9997f1c9230c2f27242b8d17e0ee67662c8f6e"},
|
| 3827 |
+
{file = "pyzmq-26.2.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:361edfa350e3be1f987e592e834594422338d7174364763b7d3de5b0995b16f3"},
|
| 3828 |
+
{file = "pyzmq-26.2.1-cp310-cp310-win32.whl", hash = "sha256:637536c07d2fb6a354988b2dd1d00d02eb5dd443f4bbee021ba30881af1c28aa"},
|
| 3829 |
+
{file = "pyzmq-26.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:45fad32448fd214fbe60030aa92f97e64a7140b624290834cc9b27b3a11f9473"},
|
| 3830 |
+
{file = "pyzmq-26.2.1-cp310-cp310-win_arm64.whl", hash = "sha256:d9da0289d8201c8a29fd158aaa0dfe2f2e14a181fd45e2dc1fbf969a62c1d594"},
|
| 3831 |
+
{file = "pyzmq-26.2.1-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:c059883840e634a21c5b31d9b9a0e2b48f991b94d60a811092bc37992715146a"},
|
| 3832 |
+
{file = "pyzmq-26.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ed038a921df836d2f538e509a59cb638df3e70ca0fcd70d0bf389dfcdf784d2a"},
|
| 3833 |
+
{file = "pyzmq-26.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9027a7fcf690f1a3635dc9e55e38a0d6602dbbc0548935d08d46d2e7ec91f454"},
|
| 3834 |
+
{file = "pyzmq-26.2.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d75fcb00a1537f8b0c0bb05322bc7e35966148ffc3e0362f0369e44a4a1de99"},
|
| 3835 |
+
{file = "pyzmq-26.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0019cc804ac667fb8c8eaecdb66e6d4a68acf2e155d5c7d6381a5645bd93ae4"},
|
| 3836 |
+
{file = "pyzmq-26.2.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:f19dae58b616ac56b96f2e2290f2d18730a898a171f447f491cc059b073ca1fa"},
|
| 3837 |
+
{file = "pyzmq-26.2.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f5eeeb82feec1fc5cbafa5ee9022e87ffdb3a8c48afa035b356fcd20fc7f533f"},
|
| 3838 |
+
{file = "pyzmq-26.2.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:000760e374d6f9d1a3478a42ed0c98604de68c9e94507e5452951e598ebecfba"},
|
| 3839 |
+
{file = "pyzmq-26.2.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:817fcd3344d2a0b28622722b98500ae9c8bfee0f825b8450932ff19c0b15bebd"},
|
| 3840 |
+
{file = "pyzmq-26.2.1-cp311-cp311-win32.whl", hash = "sha256:88812b3b257f80444a986b3596e5ea5c4d4ed4276d2b85c153a6fbc5ca457ae7"},
|
| 3841 |
+
{file = "pyzmq-26.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:ef29630fde6022471d287c15c0a2484aba188adbfb978702624ba7a54ddfa6c1"},
|
| 3842 |
+
{file = "pyzmq-26.2.1-cp311-cp311-win_arm64.whl", hash = "sha256:f32718ee37c07932cc336096dc7403525301fd626349b6eff8470fe0f996d8d7"},
|
| 3843 |
+
{file = "pyzmq-26.2.1-cp312-cp312-macosx_10_15_universal2.whl", hash = "sha256:a6549ecb0041dafa55b5932dcbb6c68293e0bd5980b5b99f5ebb05f9a3b8a8f3"},
|
| 3844 |
+
{file = "pyzmq-26.2.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:0250c94561f388db51fd0213cdccbd0b9ef50fd3c57ce1ac937bf3034d92d72e"},
|
| 3845 |
+
{file = "pyzmq-26.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36ee4297d9e4b34b5dc1dd7ab5d5ea2cbba8511517ef44104d2915a917a56dc8"},
|
| 3846 |
+
{file = "pyzmq-26.2.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c2a9cb17fd83b7a3a3009901aca828feaf20aa2451a8a487b035455a86549c09"},
|
| 3847 |
+
{file = "pyzmq-26.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:786dd8a81b969c2081b31b17b326d3a499ddd1856e06d6d79ad41011a25148da"},
|
| 3848 |
+
{file = "pyzmq-26.2.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:2d88ba221a07fc2c5581565f1d0fe8038c15711ae79b80d9462e080a1ac30435"},
|
| 3849 |
+
{file = "pyzmq-26.2.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1c84c1297ff9f1cd2440da4d57237cb74be21fdfe7d01a10810acba04e79371a"},
|
| 3850 |
+
{file = "pyzmq-26.2.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:46d4ebafc27081a7f73a0f151d0c38d4291656aa134344ec1f3d0199ebfbb6d4"},
|
| 3851 |
+
{file = "pyzmq-26.2.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:91e2bfb8e9a29f709d51b208dd5f441dc98eb412c8fe75c24ea464734ccdb48e"},
|
| 3852 |
+
{file = "pyzmq-26.2.1-cp312-cp312-win32.whl", hash = "sha256:4a98898fdce380c51cc3e38ebc9aa33ae1e078193f4dc641c047f88b8c690c9a"},
|
| 3853 |
+
{file = "pyzmq-26.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:a0741edbd0adfe5f30bba6c5223b78c131b5aa4a00a223d631e5ef36e26e6d13"},
|
| 3854 |
+
{file = "pyzmq-26.2.1-cp312-cp312-win_arm64.whl", hash = "sha256:e5e33b1491555843ba98d5209439500556ef55b6ab635f3a01148545498355e5"},
|
| 3855 |
+
{file = "pyzmq-26.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:099b56ef464bc355b14381f13355542e452619abb4c1e57a534b15a106bf8e23"},
|
| 3856 |
+
{file = "pyzmq-26.2.1-cp313-cp313-macosx_10_15_universal2.whl", hash = "sha256:651726f37fcbce9f8dd2a6dab0f024807929780621890a4dc0c75432636871be"},
|
| 3857 |
+
{file = "pyzmq-26.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57dd4d91b38fa4348e237a9388b4423b24ce9c1695bbd4ba5a3eada491e09399"},
|
| 3858 |
+
{file = "pyzmq-26.2.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d51a7bfe01a48e1064131f3416a5439872c533d756396be2b39e3977b41430f9"},
|
| 3859 |
+
{file = "pyzmq-26.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c7154d228502e18f30f150b7ce94f0789d6b689f75261b623f0fdc1eec642aab"},
|
| 3860 |
+
{file = "pyzmq-26.2.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:f1f31661a80cc46aba381bed475a9135b213ba23ca7ff6797251af31510920ce"},
|
| 3861 |
+
{file = "pyzmq-26.2.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:290c96f479504439b6129a94cefd67a174b68ace8a8e3f551b2239a64cfa131a"},
|
| 3862 |
+
{file = "pyzmq-26.2.1-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:f2c307fbe86e18ab3c885b7e01de942145f539165c3360e2af0f094dd440acd9"},
|
| 3863 |
+
{file = "pyzmq-26.2.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:b314268e716487bfb86fcd6f84ebbe3e5bec5fac75fdf42bc7d90fdb33f618ad"},
|
| 3864 |
+
{file = "pyzmq-26.2.1-cp313-cp313-win32.whl", hash = "sha256:edb550616f567cd5603b53bb52a5f842c0171b78852e6fc7e392b02c2a1504bb"},
|
| 3865 |
+
{file = "pyzmq-26.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:100a826a029c8ef3d77a1d4c97cbd6e867057b5806a7276f2bac1179f893d3bf"},
|
| 3866 |
+
{file = "pyzmq-26.2.1-cp313-cp313-win_arm64.whl", hash = "sha256:6991ee6c43e0480deb1b45d0c7c2bac124a6540cba7db4c36345e8e092da47ce"},
|
| 3867 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:25e720dba5b3a3bb2ad0ad5d33440babd1b03438a7a5220511d0c8fa677e102e"},
|
| 3868 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-macosx_10_15_universal2.whl", hash = "sha256:9ec6abfb701437142ce9544bd6a236addaf803a32628d2260eb3dbd9a60e2891"},
|
| 3869 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e1eb9d2bfdf5b4e21165b553a81b2c3bd5be06eeddcc4e08e9692156d21f1f6"},
|
| 3870 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:90dc731d8e3e91bcd456aa7407d2eba7ac6f7860e89f3766baabb521f2c1de4a"},
|
| 3871 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b6a93d684278ad865fc0b9e89fe33f6ea72d36da0e842143891278ff7fd89c3"},
|
| 3872 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:c1bb37849e2294d519117dd99b613c5177934e5c04a5bb05dd573fa42026567e"},
|
| 3873 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:632a09c6d8af17b678d84df442e9c3ad8e4949c109e48a72f805b22506c4afa7"},
|
| 3874 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-musllinux_1_1_i686.whl", hash = "sha256:fc409c18884eaf9ddde516d53af4f2db64a8bc7d81b1a0c274b8aa4e929958e8"},
|
| 3875 |
+
{file = "pyzmq-26.2.1-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:17f88622b848805d3f6427ce1ad5a2aa3cf61f12a97e684dab2979802024d460"},
|
| 3876 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3ef584f13820d2629326fe20cc04069c21c5557d84c26e277cfa6235e523b10f"},
|
| 3877 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:160194d1034902937359c26ccfa4e276abffc94937e73add99d9471e9f555dd6"},
|
| 3878 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:574b285150afdbf0a0424dddf7ef9a0d183988eb8d22feacb7160f7515e032cb"},
|
| 3879 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44dba28c34ce527cf687156c81f82bf1e51f047838d5964f6840fd87dfecf9fe"},
|
| 3880 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:9fbdb90b85c7624c304f72ec7854659a3bd901e1c0ffb2363163779181edeb68"},
|
| 3881 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a7ad34a2921e8f76716dc7205c9bf46a53817e22b9eec2e8a3e08ee4f4a72468"},
|
| 3882 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:866c12b7c90dd3a86983df7855c6f12f9407c8684db6aa3890fc8027462bda82"},
|
| 3883 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-win32.whl", hash = "sha256:eeb37f65350d5c5870517f02f8bbb2ac0fbec7b416c0f4875219fef305a89a45"},
|
| 3884 |
+
{file = "pyzmq-26.2.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4eb3197f694dfb0ee6af29ef14a35f30ae94ff67c02076eef8125e2d98963cd0"},
|
| 3885 |
+
{file = "pyzmq-26.2.1-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:36d4e7307db7c847fe37413f333027d31c11d5e6b3bacbb5022661ac635942ba"},
|
| 3886 |
+
{file = "pyzmq-26.2.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1c6ae0e95d0a4b0cfe30f648a18e764352d5415279bdf34424decb33e79935b8"},
|
| 3887 |
+
{file = "pyzmq-26.2.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5b4fc44f5360784cc02392f14235049665caaf7c0fe0b04d313e763d3338e463"},
|
| 3888 |
+
{file = "pyzmq-26.2.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:51431f6b2750eb9b9d2b2952d3cc9b15d0215e1b8f37b7a3239744d9b487325d"},
|
| 3889 |
+
{file = "pyzmq-26.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bdbc78ae2065042de48a65f1421b8af6b76a0386bb487b41955818c3c1ce7bed"},
|
| 3890 |
+
{file = "pyzmq-26.2.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d14f50d61a89b0925e4d97a0beba6053eb98c426c5815d949a43544f05a0c7ec"},
|
| 3891 |
+
{file = "pyzmq-26.2.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:004837cb958988c75d8042f5dac19a881f3d9b3b75b2f574055e22573745f841"},
|
| 3892 |
+
{file = "pyzmq-26.2.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0b2007f28ce1b8acebdf4812c1aab997a22e57d6a73b5f318b708ef9bcabbe95"},
|
| 3893 |
+
{file = "pyzmq-26.2.1-cp38-cp38-win32.whl", hash = "sha256:269c14904da971cb5f013100d1aaedb27c0a246728c341d5d61ddd03f463f2f3"},
|
| 3894 |
+
{file = "pyzmq-26.2.1-cp38-cp38-win_amd64.whl", hash = "sha256:31fff709fef3b991cfe7189d2cfe0c413a1d0e82800a182cfa0c2e3668cd450f"},
|
| 3895 |
+
{file = "pyzmq-26.2.1-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:a4bffcadfd40660f26d1b3315a6029fd4f8f5bf31a74160b151f5c577b2dc81b"},
|
| 3896 |
+
{file = "pyzmq-26.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e76ad4729c2f1cf74b6eb1bdd05f6aba6175999340bd51e6caee49a435a13bf5"},
|
| 3897 |
+
{file = "pyzmq-26.2.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8b0f5bab40a16e708e78a0c6ee2425d27e1a5d8135c7a203b4e977cee37eb4aa"},
|
| 3898 |
+
{file = "pyzmq-26.2.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e8e47050412f0ad3a9b2287779758073cbf10e460d9f345002d4779e43bb0136"},
|
| 3899 |
+
{file = "pyzmq-26.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f18ce33f422d119b13c1363ed4cce245b342b2c5cbbb76753eabf6aa6f69c7d"},
|
| 3900 |
+
{file = "pyzmq-26.2.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ceb0d78b7ef106708a7e2c2914afe68efffc0051dc6a731b0dbacd8b4aee6d68"},
|
| 3901 |
+
{file = "pyzmq-26.2.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ebdd96bd637fd426d60e86a29ec14b8c1ab64b8d972f6a020baf08a30d1cf46"},
|
| 3902 |
+
{file = "pyzmq-26.2.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:03719e424150c6395b9513f53a5faadcc1ce4b92abdf68987f55900462ac7eec"},
|
| 3903 |
+
{file = "pyzmq-26.2.1-cp39-cp39-win32.whl", hash = "sha256:ef5479fac31df4b304e96400fc67ff08231873ee3537544aa08c30f9d22fce38"},
|
| 3904 |
+
{file = "pyzmq-26.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:f92a002462154c176dac63a8f1f6582ab56eb394ef4914d65a9417f5d9fde218"},
|
| 3905 |
+
{file = "pyzmq-26.2.1-cp39-cp39-win_arm64.whl", hash = "sha256:1fd4b3efc6f62199886440d5e27dd3ccbcb98dfddf330e7396f1ff421bfbb3c2"},
|
| 3906 |
+
{file = "pyzmq-26.2.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:380816d298aed32b1a97b4973a4865ef3be402a2e760204509b52b6de79d755d"},
|
| 3907 |
+
{file = "pyzmq-26.2.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97cbb368fd0debdbeb6ba5966aa28e9a1ae3396c7386d15569a6ca4be4572b99"},
|
| 3908 |
+
{file = "pyzmq-26.2.1-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abf7b5942c6b0dafcc2823ddd9154f419147e24f8df5b41ca8ea40a6db90615c"},
|
| 3909 |
+
{file = "pyzmq-26.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3fe6e28a8856aea808715f7a4fc11f682b9d29cac5d6262dd8fe4f98edc12d53"},
|
| 3910 |
+
{file = "pyzmq-26.2.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:bd8fdee945b877aa3bffc6a5a8816deb048dab0544f9df3731ecd0e54d8c84c9"},
|
| 3911 |
+
{file = "pyzmq-26.2.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ee7152f32c88e0e1b5b17beb9f0e2b14454235795ef68c0c120b6d3d23d12833"},
|
| 3912 |
+
{file = "pyzmq-26.2.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:baa1da72aecf6a490b51fba7a51f1ce298a1e0e86d0daef8265c8f8f9848eb77"},
|
| 3913 |
+
{file = "pyzmq-26.2.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:49135bb327fca159262d8fd14aa1f4a919fe071b04ed08db4c7c37d2f0647162"},
|
| 3914 |
+
{file = "pyzmq-26.2.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8bacc1a10c150d58e8a9ee2b2037a70f8d903107e0f0b6e079bf494f2d09c091"},
|
| 3915 |
+
{file = "pyzmq-26.2.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:09dac387ce62d69bec3f06d51610ca1d660e7849eb45f68e38e7f5cf1f49cbcb"},
|
| 3916 |
+
{file = "pyzmq-26.2.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:70b3a46ecd9296e725ccafc17d732bfc3cdab850b54bd913f843a0a54dfb2c04"},
|
| 3917 |
+
{file = "pyzmq-26.2.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:59660e15c797a3b7a571c39f8e0b62a1f385f98ae277dfe95ca7eaf05b5a0f12"},
|
| 3918 |
+
{file = "pyzmq-26.2.1-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0f50db737d688e96ad2a083ad2b453e22865e7e19c7f17d17df416e91ddf67eb"},
|
| 3919 |
+
{file = "pyzmq-26.2.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a003200b6cd64e89b5725ff7e284a93ab24fd54bbac8b4fa46b1ed57be693c27"},
|
| 3920 |
+
{file = "pyzmq-26.2.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:f9ba5def063243793dec6603ad1392f735255cbc7202a3a484c14f99ec290705"},
|
| 3921 |
+
{file = "pyzmq-26.2.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1238c2448c58b9c8d6565579393148414a42488a5f916b3f322742e561f6ae0d"},
|
| 3922 |
+
{file = "pyzmq-26.2.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8eddb3784aed95d07065bcf94d07e8c04024fdb6b2386f08c197dfe6b3528fda"},
|
| 3923 |
+
{file = "pyzmq-26.2.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0f19c2097fffb1d5b07893d75c9ee693e9cbc809235cf3f2267f0ef6b015f24"},
|
| 3924 |
+
{file = "pyzmq-26.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0995fd3530f2e89d6b69a2202e340bbada3191014352af978fa795cb7a446331"},
|
| 3925 |
+
{file = "pyzmq-26.2.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:7c6160fe513654e65665332740f63de29ce0d165e053c0c14a161fa60dd0da01"},
|
| 3926 |
+
{file = "pyzmq-26.2.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:8ec8e3aea6146b761d6c57fcf8f81fcb19f187afecc19bf1701a48db9617a217"},
|
| 3927 |
+
{file = "pyzmq-26.2.1.tar.gz", hash = "sha256:17d72a74e5e9ff3829deb72897a175333d3ef5b5413948cae3cf7ebf0b02ecca"},
|
| 3928 |
]
|
| 3929 |
|
| 3930 |
[package.dependencies]
|
|
|
|
| 4844 |
|
| 4845 |
[[package]]
|
| 4846 |
name = "torch"
|
| 4847 |
+
version = "2.5.1"
|
| 4848 |
description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration"
|
| 4849 |
optional = false
|
| 4850 |
+
python-versions = ">=3.8.0"
|
| 4851 |
files = [
|
| 4852 |
+
{file = "torch-2.5.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:71328e1bbe39d213b8721678f9dcac30dfc452a46d586f1d514a6aa0a99d4744"},
|
| 4853 |
+
{file = "torch-2.5.1-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:34bfa1a852e5714cbfa17f27c49d8ce35e1b7af5608c4bc6e81392c352dbc601"},
|
| 4854 |
+
{file = "torch-2.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:32a037bd98a241df6c93e4c789b683335da76a2ac142c0973675b715102dc5fa"},
|
| 4855 |
+
{file = "torch-2.5.1-cp310-none-macosx_11_0_arm64.whl", hash = "sha256:23d062bf70776a3d04dbe74db950db2a5245e1ba4f27208a87f0d743b0d06e86"},
|
| 4856 |
+
{file = "torch-2.5.1-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:de5b7d6740c4b636ef4db92be922f0edc425b65ed78c5076c43c42d362a45457"},
|
| 4857 |
+
{file = "torch-2.5.1-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:340ce0432cad0d37f5a31be666896e16788f1adf8ad7be481196b503dad675b9"},
|
| 4858 |
+
{file = "torch-2.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:603c52d2fe06433c18b747d25f5c333f9c1d58615620578c326d66f258686f9a"},
|
| 4859 |
+
{file = "torch-2.5.1-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:31f8c39660962f9ae4eeec995e3049b5492eb7360dd4f07377658ef4d728fa4c"},
|
| 4860 |
+
{file = "torch-2.5.1-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:ed231a4b3a5952177fafb661213d690a72caaad97d5824dd4fc17ab9e15cec03"},
|
| 4861 |
+
{file = "torch-2.5.1-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:3f4b7f10a247e0dcd7ea97dc2d3bfbfc90302ed36d7f3952b0008d0df264e697"},
|
| 4862 |
+
{file = "torch-2.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:73e58e78f7d220917c5dbfad1a40e09df9929d3b95d25e57d9f8558f84c9a11c"},
|
| 4863 |
+
{file = "torch-2.5.1-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:8c712df61101964eb11910a846514011f0b6f5920c55dbf567bff8a34163d5b1"},
|
| 4864 |
+
{file = "torch-2.5.1-cp313-cp313-manylinux1_x86_64.whl", hash = "sha256:9b61edf3b4f6e3b0e0adda8b3960266b9009d02b37555971f4d1c8f7a05afed7"},
|
| 4865 |
+
{file = "torch-2.5.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:1f3b7fb3cf7ab97fae52161423f81be8c6b8afac8d9760823fd623994581e1a3"},
|
| 4866 |
+
{file = "torch-2.5.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:7974e3dce28b5a21fb554b73e1bc9072c25dde873fa00d54280861e7a009d7dc"},
|
| 4867 |
+
{file = "torch-2.5.1-cp39-cp39-win_amd64.whl", hash = "sha256:46c817d3ea33696ad3b9df5e774dba2257e9a4cd3c4a3afbf92f6bb13ac5ce2d"},
|
| 4868 |
+
{file = "torch-2.5.1-cp39-none-macosx_11_0_arm64.whl", hash = "sha256:8046768b7f6d35b85d101b4b38cba8aa2f3cd51952bc4c06a49580f2ce682291"},
|
|
|
|
|
|
|
|
|
|
| 4869 |
]
|
| 4870 |
|
| 4871 |
[package.dependencies]
|
|
|
|
| 4882 |
nvidia-curand-cu12 = {version = "10.3.5.147", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4883 |
nvidia-cusolver-cu12 = {version = "11.6.1.9", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4884 |
nvidia-cusparse-cu12 = {version = "12.3.1.170", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
|
|
|
| 4885 |
nvidia-nccl-cu12 = {version = "2.21.5", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4886 |
nvidia-nvjitlink-cu12 = {version = "12.4.127", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4887 |
nvidia-nvtx-cu12 = {version = "12.4.127", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
|
| 4888 |
setuptools = {version = "*", markers = "python_version >= \"3.12\""}
|
| 4889 |
sympy = {version = "1.13.1", markers = "python_version >= \"3.9\""}
|
| 4890 |
+
triton = {version = "3.1.0", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version < \"3.13\""}
|
| 4891 |
+
typing-extensions = ">=4.8.0"
|
| 4892 |
|
| 4893 |
[package.extras]
|
| 4894 |
opt-einsum = ["opt-einsum (>=3.3)"]
|
| 4895 |
+
optree = ["optree (>=0.12.0)"]
|
| 4896 |
|
| 4897 |
[[package]]
|
| 4898 |
name = "tornado"
|
|
|
|
| 5021 |
|
| 5022 |
[[package]]
|
| 5023 |
name = "triton"
|
| 5024 |
+
version = "3.1.0"
|
| 5025 |
description = "A language and compiler for custom Deep Learning operations"
|
| 5026 |
optional = false
|
| 5027 |
python-versions = "*"
|
| 5028 |
files = [
|
| 5029 |
+
{file = "triton-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b0dd10a925263abbe9fa37dcde67a5e9b2383fc269fdf59f5657cac38c5d1d8"},
|
| 5030 |
+
{file = "triton-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f34f6e7885d1bf0eaaf7ba875a5f0ce6f3c13ba98f9503651c1e6dc6757ed5c"},
|
| 5031 |
+
{file = "triton-3.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8182f42fd8080a7d39d666814fa36c5e30cc00ea7eeeb1a2983dbb4c99a0fdc"},
|
| 5032 |
+
{file = "triton-3.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6dadaca7fc24de34e180271b5cf864c16755702e9f63a16f62df714a8099126a"},
|
| 5033 |
+
{file = "triton-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aafa9a20cd0d9fee523cd4504aa7131807a864cd77dcf6efe7e981f18b8c6c11"},
|
| 5034 |
]
|
| 5035 |
|
| 5036 |
+
[package.dependencies]
|
| 5037 |
+
filelock = "*"
|
| 5038 |
+
|
| 5039 |
[package.extras]
|
| 5040 |
build = ["cmake (>=3.20)", "lit"]
|
| 5041 |
tests = ["autopep8", "flake8", "isort", "llnl-hatchet", "numpy", "pytest", "scipy (>=1.7.1)"]
|
|
|
|
| 5468 |
[metadata]
|
| 5469 |
lock-version = "2.0"
|
| 5470 |
python-versions = "^3.10"
|
| 5471 |
+
content-hash = "9060b047f34d36d3ee1850cbbbaf2078fe14471661117b786c4e9a7661dc659a"
|
pyproject.toml
CHANGED
|
@@ -22,7 +22,7 @@ pydantic = "^2.4.2"
|
|
| 22 |
pydantic-settings = "^2.0.3"
|
| 23 |
transformers = "^4.45.2"
|
| 24 |
python-dotenv = "^1.0.0"
|
| 25 |
-
torch = "
|
| 26 |
tqdm = "^4.66.1"
|
| 27 |
ftfy = "^6.1.1"
|
| 28 |
rapidfuzz = "^3.8.1"
|
|
@@ -49,7 +49,6 @@ apted = "1.0.3"
|
|
| 49 |
distance = "0.1.3"
|
| 50 |
lxml = "5.3.0"
|
| 51 |
tabulate = "^0.9.0"
|
| 52 |
-
pymupdf = "^1.25.2"
|
| 53 |
|
| 54 |
[tool.poetry.scripts]
|
| 55 |
marker = "marker.scripts.convert:convert_cli"
|
|
|
|
| 22 |
pydantic-settings = "^2.0.3"
|
| 23 |
transformers = "^4.45.2"
|
| 24 |
python-dotenv = "^1.0.0"
|
| 25 |
+
torch = "~2.5.1" # 2.6.0 appears to fail with mps
|
| 26 |
tqdm = "^4.66.1"
|
| 27 |
ftfy = "^6.1.1"
|
| 28 |
rapidfuzz = "^3.8.1"
|
|
|
|
| 49 |
distance = "0.1.3"
|
| 50 |
lxml = "5.3.0"
|
| 51 |
tabulate = "^0.9.0"
|
|
|
|
| 52 |
|
| 53 |
[tool.poetry.scripts]
|
| 54 |
marker = "marker.scripts.convert:convert_cli"
|