EXPAND to see symptom, cause, and solution.
After invoking Model Scanner CLI, with a single input file.
docker run --rm \
--entrypoint /modelscan/cli \
-v /home/user/models:/files-to-scan \
quay.io/hiddenlayer/distro-cli-modelscanner:latest --input /files-to-scan/safe_tf_to_h5_cancer_model.h5The input file isn't found.
{
"correlation_id": "5ea73bc6-aa35-400b-a0b2-60509da46dde",
"error": "stat /files-to-scan/safe_tf_to_h5_cancer_model.h5: no such file or directory",
"event": "could not locate file, please double check file(s) exist locally",
"file_name": "/files-to-scan/safe_tf_to_h5_cancer_model.h5",
"level": "error",
"timestamp": "2024-05-19T09:17:59.626-05:00"
}This example runs the latest Model Scanner CLI image. Change the Model Scanner CLI version if you want to pull a different Model Scanner version.
- The volume mount may not be specified correctly.
- The volume mount is specified correctly, but the file specified in the
--inputargument doesn’t exist.
- Ensure the volume mount(s) are specified according to the Volume Mounts section.
- Ensure the
--input argumentis an absolute path to a file or directory on the mounted volume from the container’s perspective.
EXPAND to see symptom, cause, and solution.
When scanning a model from Hugging Face, you will receive a Docker error message, an event failure message, or see a number of failed file scans.
Docker error message:
"error": "write {{path/to/file}}: no space left on device"Error message:
"error": "write {{path/to/file}}: no space left on device"- Failed event:
“event”: “failed to download from input URI” - Some of the file is downloaded but fails to be written to disk
- Failed event:
Failed to scan:
“files_failed_to_scan”: {{integer}}- Part of the scan summary
When scanning a model from Hugging Face, all files are downloaded from the Hugging Face repository and then scanned.
If there is not enough disk space to store the repository files, the scan fails.
Free up disk space and run the scan again.
EXPAND to see symptom, cause, and solution.
After invoking Model Scanner CLI, scan results are returned, but the results key is empty.
[
{
"detections": [],
"end_time": 1715772174210,
"file_pointer": "file:/files-to-scan/my_model.bin",
"results": {},
"scan_id": "d2884831e63fea16f65392de37855c72e208caded5e5bd764cd7f3651f9cc897",
"start_time": 1715772173215,
"status": "done"
}
]- Model Scanner CLI does not recognize the model type.
- This is expected behavior if Model Scanner CLI does not support the given model’s type.
- If Model Scanner CLI does support the input model’s type, please contact HiddenLayer Support for next steps.
EXPAND to see symptom, cause, and solution.
After invoking Model Scanner CLI, an error message is displayed like the below:
{"correlation_id":"00000000-0000-0000-0000-000000000000","event":"HL_LICENSE is required. Please provide a valid license.","level":"error","timestamp":"2024-12-18T00:00:00.000Z"}- Model Scanner CLI requires a valid product license to be provided in the HL_LICENSE environment variable with the argument
-e HL_LICENSE.
- Contact your HiddenLayer representative to obtain a valid product license. Then provide the license key in the HL_LICENSE environment variable or pass.
EXPAND to see symptom, cause, and solution.
- Log content is generally only useful for debugging and understanding error conditions.
- Log content is not fixed and may vary between versions of Model Scanner CLI.
- Customers should not rely on the presence, or absence, of specific log messages or content.
- Model Scanner CLI’s default log level is
error. - This level is relatively terse; it causes Model Scanner CLI to only emit the most important log messages during execution.
- Running Model Scanner CLI with a more verbose log level is not recommended during normal operations.
debug-level output can be voluminous, can contain too much detail for everyday use, and may produce large log files.
- In order to troubleshoot usage scenarios, it is possible to change the log level to a more verbose level using the
HL_LOG_LEVELenvironment variable. - Note: This example runs the latest Model Scanner CLI image. Change the Model Scanner CLI version if you want to pull a different Model Scanner version.
Example: Set to Debug
docker run --rm \
-e HL_LICENSE \
-e HL_LOG_LEVEL=debug \
-v /home/user/models:/files-to-scan \
quay.io/hiddenlayer/distro-cli-modelscanner:latest \
--input /files-to-scan/my_model.keras