Allow custom drivers and pin types
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
まず、既存の pin_read、pin_write、pin_upload、pin_download のエントリポイントと、公式にサポートされているドライバーの処理を読みます。現在、型とメタデータがどのようにディスパッチされているかを比較し、関連する制約について、リンクされている lazyscribe ハンドラーとエントリポイントの例を確認します。カスタムドライバーをカスタム型に関連付け、pin_read および pin_write インターフェースを通じて使用できるようになれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I'm looking at using pins to version various model assets, but one of the pain points I'm running into is custom drivers for reading and writing. Many of our model artifacts are serialized to YAML or ONNX or a custom serialization, but there's no driver for those. There's friction too if we wanted, say a polars driver to read a csv or parquet directly into polars.
This leaves pin_upload and pin_download, which while workable, doesn't provide the same level of integration as pin_read and pin_write. If you use a user-defined helper with pin_download to read a custom type, then users have to know in advance to use that helper, versus just board.pin_read(name) for officially supported types.
For example, to show the difference in experience between a csv file and yaml:
import pandas as pd
import yaml
from pins import board_temp
board = board_temp()
data = pd.DataFrame({"a": [1,2,3]})
board.pin_write(data, "pandas_data", type="csv")
with open("data.yml", "w") as f:
yaml.dump({"a": [1,2,3]}, f)
board.pin_upload("data.yml", name="yaml_data")
# Reading
pandas_data_read = board.pin_read("pandas_data")
yaml_path = board.pin_download("yaml_data")[0]
with open(yaml_path) as f:
yaml_data_read = yaml.safe_load(f)
# Using helper
def pin_read_yaml(board, *args, **kwargs):
yaml_path = board.pin_download(*args, **kwargs)[0]
with open(yaml_path) as f:
return yaml.safe_load(f)
yaml_helper_read = pin_read_yaml(board, "yaml_data") # need to know in advance to use yaml, not just pin_read(name)
Optimally, I want to be able to specify custom types that are associated with custom drivers. The custom type would be written to data.txt, which would allow for dispatching to the associated driver on pin_read like is done for officially supported types, without needing to know in advance to use a user-defined helper.
I'm also seeing similarities between this problem and "dynamic artifact handling" in another library we work on (lazyscribe/lazyscribe#56), where we used handler classes and entrypoints to allow users to define custom artifact serializers/deserializers.
Anyway, please let me know if I'm missing anything here and what you think!
- 主要言語
- Python
- スター
- 59
- フォーク
- 11
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rstudio/pins-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rstudio/pins-python#367 ·
-
.maint
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rstudio/pins-python#280 ·
-
testing
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rstudio/pins-python#196 ·
-
.enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
rstudio/pins-python#363 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
rstudio/pins-python#354 ·
rstudio/pins-python の issue をすべて見る
似ている issue
-
docs(contributing): the two things that silently block a PR対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンavailable documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 95/100
Nixitov/Riptide-Native#944 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
JTHCode/secretguard#24 ·
メンテナーはふだん 1 日以内に返信
-
area: middleware documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
omarelshamy25x/shamy-hijri#63 ·
メンテナーはふだん 1 日以内に返信