Extract embeddings values using PredictionServiceClient
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- google-cloud, javascript, node.js
- 領域
- api, machine-learning
調査の方向性
参照されている行の ai-platform/snippets/predict-text-embeddings.js から始めて、PredictionServiceClient のレスポンスがどのように表現されているかを確認します。embeddings の値にアクセスする方法と、issue に示されている JSON 形式と出力を一致させるためにサンプルまたはそのドキュメントに明確化が必要かどうかを判断します。
索引モデルが issue の本文から書いたものです。
説明
Hi! I'm trying to find how to extract the embeddings values to add them to a json files following this format following the example https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/62253bb75d6068e1b44047eac5572246dfaa217b/ai-platform/snippets/predict-text-embeddings.js#L76C69-L76C69:
{"id":"0","embedding":[0.005268869,-0.019839672,0.0035084013,0.0536439,-0.028307509,0.0037563213, ...]}
But not sure how to access or put them into an array. The type is google.protobuf.IValue so in the example it iterates over an array google.protobuf.IValue[]. I'm doing:
const predictions = response.predictions;
for (const prediction of predictions) {
const value: google.protobuf.IValue = prediction;
console.log(`\t\tPrediction`, value.structValue); // structValue is the only one not returning undefined
// this returns: **fields: { embeddings: { structValue: [Object], kind: 'structValue' } }**
}
Thanks
- 主要言語
- JavaScript
- スター
- 3k
- フォーク
- 2k
- 平均マージ
- 3日 23時間
- マージ済み PR(30日)
- 30
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GoogleCloudPlatform/nodejs-docs-samples のほかの issue
-
eslintrc rules may be invalid対応中かも @yuhuayang-google が 15 日前に担当しました。 オープンpriority: p2 samples triage me type: bug
難易度 1/5 1時間未満 初心者へのやさしさ 48/100
GoogleCloudPlatform/nodejs-docs-samples#4174 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
priority: p2 samples type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
GoogleCloudPlatform/nodejs-docs-samples#4144 ·
メンテナーはふだん 3 日以内に返信
-
priority: p2 samples triage me type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
GoogleCloudPlatform/nodejs-docs-samples#3859 ·
メンテナーはふだん 3 日以内に返信
-
priority: p3 samples triage me type: feature request
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
GoogleCloudPlatform/nodejs-docs-samples#3578 · コメント 13 件 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
samples type: feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
GoogleCloudPlatform/nodejs-docs-samples#3577 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
GoogleCloudPlatform/nodejs-docs-samples の issue をすべて見る
似ている issue
-
check:passed feeds:add
難易度 2/5 1時間未満 初心者へのやさしさ 62/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
codex-team/editor.js#3037 ·
-
No Code Attached Yet
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
joomla/joomla-cms#48626 ·
メンテナーはふだん 1 日以内に返信
-
complexity: trivial good first issue impact: low
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
ueberdosis/tiptap#8522 ·
メンテナーはふだん 1 日以内に返信
-
internal os specific
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
frostney/GocciaScript#1688 ·
メンテナーはふだん 1 日以内に返信