デプロイからのスコアリングコードのダウンロード¶
本機能の提供について
スコアリングコードをダウンロードするデプロイの動作は、組織のMLOps設定によって異なります。
DataRobotプラットフォームの外部で使用するために、モデルのスコアリングコードは、コンパイル済みのJARファイル(すべての依存関係を含む)としてダウンロードできます。 このトピックでは、デプロイからスコアリングコードをダウンロードする方法について説明します。 または、リーダーボードからダウンロードすることもできます。
デプロイのダウンロード¶
For Scoring Code-enabled models deployed to an external prediction server, you can download Scoring Code from a deployment's Actions menu in the Deployments inventory or from a deployment's Predictions > Portable Predictions tab. For Scoring Code-enabled models deployed to a DataRobot prediction environment, you can only download Scoring Code from the Deployments inventory.
-
Navigate to the Deployments inventory, and then take either of the following steps:
-
Open a deployment, then navigate to the Predictions > Portable Predictions tab and click Scoring Code.
備考
The Portable Predictions tab is only available for models deployed to an external environment. If you deployed your model to a DataRobot environment, use the Deployments inventory Scoring Code download method.
-
Open the deployment's Actions menu and click Get Scoring Code.
The Download Scoring Code dialog opens.
-
-
ポータブル予測タブの以下のフィールドに入力します(or the Download Scoring Code dialog)。
要素 説明 スコアリングコード DataRobotモデルを含むJavaパッケージを提供。 ポータブル予測法の下で、スコアリングコードを選択します。 または、ポータブル予測サーバーを選択して、REST APIベースの予測サーバーを設定します。 プログラミング言語 Select the location from which you want to call the Scoring Code: Python API, Java API, or the command line interface (CLI). Selecting a location updates the example snippet displayed below to the corresponding language. 監視エージェントを含める スコアリングコードでMLOpsエージェントをダウンロード。 予測の説明を含める スコアリングコードを使用して、予測の説明を計算するコードを含めます。 これにより、コマンドラインオプションを追加して、スコアリングコードから予測の説明を取得できます。 --with-explanations
。 詳細については、コマンドラインでのスコアリングを参照してください。Include Prediction Intervals (for time series) スコアリングコードを使用して、予測の説明を計算するコードを含めます。 This allows you to get Prediction Intervals (from 1 to 99) from your Scoring Code by adding the command line option: --interval_length=<integer value from 1 to 99>
. 詳細については、コマンドラインでのスコアリングを参照してください。準備とダウンロード/ソースコードとして準備およびダウンロード - 準備とダウンロード:スコアリングコードをJavaパッケージとしてダウンロード。 これらのパッケージにはコンパイルされたJava実行可能ファイルがあり、すべての依存関係を含み、予測を行うことができます。
- ソースコードとして準備およびダウンロード:Javaソースコードファイルをダウンロード。 これらは非難読化バージョンのモデルです。これらのモデルコンパイルされておらず、依存パッケージが含まれていないので、モデルのスコアリングには使用できません。 ソースファイルを使用して、モデルの意思決定プロセスを確認できます。 このオプションは、監視エージェントと予測の説明が有効になっていない場合にのみ使用できます。
例 Provides a code example that calls the Scoring Code using the selected coding language. クリップボードにコピー スコアリングコードの例をクリップボードにコピーして、IDEやコマンドラインに貼り付けられるようにします。 ヒント
Access the DataRobot Prediction Library to make predictions using various prediction methods supported by DataRobot via a Python API. The library provides a common interface for making predictions, making it easy to swap out any underlying implementation. Note that the library requires a Scoring Code JAR file.
-
設定が完了したら、準備とダウンロードをクリックしてJavaパッケージをダウンロード、またはソースコードとして準備およびダウンロードをクリックしてソースコードファイルをダウンロードします。
注意
5.0の料金プランを使用していないユーザーがスコアリングコードのダウンロードを選択する場合、デプロイは永続的になり、削除できません。 注意メッセージが表示され、この条件を受け入れるように求められます。 トグルで理解したことを示し、その後準備とダウンロードをクリックしてJavaパッケージをダウンロード、またはソースコードとして準備およびダウンロードをクリックしてソースコードファイルをダウンロードします。
-
When the Scoring Code download completes, use the snippet provided on the tab to call the Scoring Code.
たとえば、MLOpsエージェントtarballドキュメントをリファレンスします。これは、開発者ツールページからダウンロードできます。 You can also use the monitoring snippet to integrate with the MLOps Agent.