verify() rejects a not-equal written in the other order
評価
調査の方向性
Start by tracing verify() and the relation lookup that uses INVERSE_RELATIONS, then inspect the existing tests for inverse relations. Add coverage for swapped Ne comparisons with and without raise_on_error=True; done means equivalent inequalities match in both orders, while comparisons with different values remain false.
索引モデルが issue の本文から書いたものです。
説明
verify() returns False when the two sides of a not-equal are swapped. With raise_on_error=True the same comparison raises KeyError.
from math_verify import parse, verify
verify(parse(r"$1 \neq 2$"), parse(r"$2 \neq 1$"))
# False
verify(parse(r"$x \neq y$"), parse(r"$y \neq x$"), raise_on_error=True)
# KeyError: <class 'sympy.core.relational.Unequality'>
x > 1 matches 1 < x, and x = 1 matches 1 = x. Those relations are listed in INVERSE_RELATIONS. Ne is not, so the flipped comparison looks it up and raises. The default raise_on_error=False turns that into False, so 1 \neq 2 is scored wrong against 2 \neq 1.
The same statement in the same order still matches, and a different value stays wrong: x \neq 1 against x \neq 2 is False.
This is on main (ba3d3aa).
- 主要言語
- Python
- スター
- 1.2k
- フォーク
- 65
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
huggingface/Math-Verify のほかの issue
-
verify() raises ValueError comparing chained relations of different length対応中かも @chetana1410 が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
huggingface/Math-Verify#93 ·
-
A period inside the math delimiters (`$\frac{1}{3}.$`) makes correct answers fail and can make wrong ones pass対応中かも @MohammadHijjawi97 が 26 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
huggingface/Math-Verify#85 ·
-
evaluate_model_outputs.py: rows whose gold cannot be extracted are dropped from the accuracy denominator, so the printed accuracy disagrees with the is_correct column the script writes対応中かも @shaurya416 が 32 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
huggingface/Math-Verify#83 ·
-
verify() rejects an absolute-value inequality that is the same interval対応中かも @chetana1410 が 3 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
huggingface/Math-Verify#98 ·
-
verify() rejects equivalent chained relations written in a different order対応中かも @chetana1410 が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
huggingface/Math-Verify#96 ·
huggingface/Math-Verify の issue をすべて見る
似ている issue
-
backlog
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
EchoTools/nevr-runtime#1108 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
btclib-org/btclib-wallet#587 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Judgment-Pack/judgment-pack-spec#275 ·
メンテナーはふだん 1 日以内に返信