When a model is deployed, CDSW enables you to specify the number of replicas that
must be deployed to serve requests. If a replica crashes or fails to come up, you can
diagnose it by viewing the logs for every replica using the model CLI.
-
Obtain the
modelReplicaId
by using the following
command:
cdswctl models listReplicas --modelDeploymentId=<model_deployment_ID>
where the model_deployment_ID is the ID of a successfully
deployed model.
-
To view the replica logs, run the following command:
cdswctl models getReplicaLogs --modelDeploymentId=<model_deployment_ID> --modelReplicaId="<replica_ID>" --streams=stdout
For example:
cdswctl models getReplicaLogs --modelDeploymentId=2 --modelReplicaId="petal-length-predictor-1-2-6d6496b467-hp6tz" --streams=stdout
The valid values for the streams
parameter are
stdout
and stderr
.