インストールと設定¶
実行中、エージェントは、設定されたディレクトリまたはメッセージキューイングシステムでバッファリングされたメッセージを探して転送します。バッファリングされたメッセージをMLOpsライブラリからDataRobot MLOpsに転送するには、以下に示すようにMLOpsエージェントをインストールして設定します。
MLOpsエージェントをインストールする¶
MLOps.tarファイルを解凍する¶
> tar -xvf datarobot_mlops_package-*.tar.gz
設定ファイルの更新¶
> cd datarobot_mlops_package-*;
> <your-favorite-editor> ./conf/mlops.agent.conf.yaml
MLOpsエージェントを使用する¶
MLOpsエージェントを実行する¶
設定ファイルを使用してエージェントを起動します。
> cd datarobot_mlops_package-*;
> ./bin/start-agent.sh
または、環境変数を使用してエージェントを起動します。
> export AGENT_CONFIG_YAML=<path/to/conf/mlops.agent.conf.yaml> ; \
export AGENT_LOG_PROPERTIES=<path/to/conf/mlops.log4j2.properties>; \
export AGENT_JVM_OPT=-Xmx4G \
export AGENT_JAR_PATH=<path/to/bin/mlops-agent-ver.jar> \
sh -x /bin/start-agent.sh
# AGENT_CONFIG_YAML environmment variable to override the default path to mlops.agent.conf.yaml
# AGENT_LOG_PROPERTIES environmment variable to override the default path to mlops.log4j2.properties
# AGENT_JVM_OPT environmment variable to override the default JVM option `-Xmx4G`
# AGENT_JAR_PATH environmment variable to override the default JAR file path to agent-<ver>.jar
エージェントステータスを確認する¶
> ./bin/status-agent.sh
リアルタイムリソースを使用して、エージェントのステータスを取得する¶
> ./bin/status-agent.sh --verbose
エージェントをシャットダウンする¶
> ./bin/stop-agent.sh
MLOpsエージェントを設定する¶
エージェント設定ファイル(conf\mlops.agent.conf.yaml
)を編集するには、mlopsUrl
およびapiToken
の値を更新する必要があります。デフォルトでは、エージェントはファイルシステムのチャネルを使用します。ファイルシステムのチャネルを使用する場合は、必ずスプーラーディレクトリ(デフォルトでは/tmp/ta
)を作成してください。別のチャネルを使用する場合は、ファイル内のコメントに従ってエージェント設定ファイルを更新してください。
# URL to the DataRobot MLOps service
mlopsUrl: "https://<DATAROBOT_HOST>"
# DataRobot API token
apiToken: "FILL_IN_HERE"
# Execute the agent once, then exit
runOnce: false
# When dryrun mode is true, do not report the metrics to MLOps service
dryRun: false
# When verifySSL is true, SSL certification validation will be performed when
# connecting to MLOps DataRobot. When verifySSL is false, these checks are skipped.
# Note: It is highly recommended to keep this config variable as true.
verifySSL: true
# Path to the agent's log file
logPath: "./logs/mlops.agent.log"
# Path to write agent stats
statsPath: "/tmp/tracking-agent-stats.json"
# Number of times the agent will retry sending a request to the MLOps service on failure.
httpRetry: 1
# Http client timeout in milliseconds (30sec timeout)
httpTimeout: 30000
# Comment out and configure the lines below for the spooler type(s) you are using.
# Note: the spooler configuration must match that used by the MLOps library.
# Note: Spoolers must be set up before using them.
# - For the filesystem spooler, create the directory that will be used.
# - For the SQS spooler, create the queue.
# - For the PubSub spooler, create the project and topic.
channelConfigs:
- type: "FS_SPOOL"
details: {name: "filesystem", directory: "/tmp/ta"}
# - type: "SQS_SPOOL"
# details: {name: "sqs", queueUrl: "your SQS queue URL", queueName: "<your AWS SQS queue name>"}
# - type: "RABBITMQ_SPOOL"
# details: {name: "rabbit", queueName: <your rabbitmq queue name>, queueUrl: "amqp://<ip address>"}
# - type: "PUBSUB_SPOOL"
# details: {name: "pubsub", projectId: <your project ID>, topicName: <your topic name>}
# The number of threads that the agent will launch to process data records.
agentThreadPoolSize: 4
# The maximum number of records each thread will process per fetchNewDataFreq interval.
agentMaxRecordsTask: 100
# Maximum number of records to aggregate before sending to MMM
agentMaxAggregatedRecords: 500
# A timeout for pending records before aggregating and submitting
agentPendingRecordsTimeoutMs: 2500
更新しました February 22, 2022
このページは役に立ちましたか?
ありがとうございます。どのような点が役に立ちましたか?
より良いコンテンツを提供するには、どうすればよいでしょうか?
アンケートにご協力いただき、ありがとうございました。