View replica logs for a model using the CLI
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.
modelReplicaIdby 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=stdoutFor example:
cdswctl models getReplicaLogs --modelDeploymentId=2 --modelReplicaId="petal-length-predictor-1-2-6d6496b467-hp6tz" --streams=stdoutThe valid values for the