MLX compatibility: Statistical functions

オープン
#463 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

まず、指定されたテストを実行します: test_cumulative_sum、test_cumulative_prod、test_prod、test_std、test_sum、test_var。Python 互換レイヤーを通じてそれらの失敗を追跡し、各 wrapper をここに示されている Array API のシグネチャおよび dtype ルールと比較します。6 つすべての統計関数で、keyword の不一致と小さな整数の promotion ケースに合格すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Array API MLX Analog Status Notes Test Node Result
cumulative_sum(x, /, *, axis=None, dtype=None, include_initial=False) cumsum(a, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, dtype: Dtype | None = None, stream=None) incompatible MLX lacks the include_initial keyword (raises TypeError) and skips the standard default-integer dtype promotion — a uint8 input stays uint8 instead of promoting to uint32. test_cumulative_sum Failed
cumulative_prod(x, /, *, axis=None, dtype=None, include_initial=False) cumprod(a, /, axis: int | None = None, *, reverse: bool = False, inclusive: bool = True, dtype: Dtype | None = None, stream=None) incompatible Same two issues as cumulative_sum: missing include_initial keyword and no default-integer dtype promotion (uint8 stays uint8 instead of uint32). test_cumulative_prod Failed
prod(x, /, *, axis=None, dtype=None, keepdims=False) prod(a, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream=None) incompatible MLX has no dtype keyword (raises TypeError) and does not promote small integer inputs to the standard default integer dtype (uint8 stays uint8 instead of uint32). test_prod Failed
std(x, /, *, axis=None, correction=0.0, keepdims=False) std(a, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, ddof: int = 0, *, stream=None) incompatible MLX exposes ddof instead of the Array API's correction keyword, so passing correction raises a TypeError. test_std Failed
sum(x, /, *, axis=None, dtype=None, keepdims=False) sum(a, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, *, stream=None) incompatible MLX has no dtype keyword (raises TypeError) and does not promote small integer inputs to the standard default integer dtype (uint8 stays uint8 instead of uint32). test_sum Failed
var(x, /, *, axis=None, correction=0.0, keepdims=False) var(a, /, axis: None | int | Sequence[int] = None, keepdims: bool = False, ddof: int = 0, *, stream=None) incompatible MLX exposes ddof instead of the Array API's correction keyword, so passing correction raises a TypeError. test_var Failed
主要言語
Python
スター
131
フォーク
49
平均マージ
2日 8時間
マージ済み PR(30日)
6

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

data-apis/array-api-compat のほかの issue

data-apis/array-api-compat の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。