# Troubleshooting ## Input file is not found details summary b EXPAND to see symptom, cause, and solution. ### Symptom After invoking AI Supply Chain Security 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.h5 ``` The 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" } ``` Supply Chain Version This example runs the latest Supply Chain CLI image. Change the Supply Chain CLI version if you want to pull a different Supply Chain version. ### Causes 1. The volume mount may not be specified correctly. 2. The volume mount is specified correctly, but the file specified in the `--input` argument doesn’t exist. ### Resolution - Ensure the volume mount(s) are specified according to the [Volume Mounts section](/docs/products/supply-chain/cli/commandline_arguments#volume-mounts). - Ensure the `--input argument` is an absolute path to a file or directory on the mounted volume from the container’s perspective. ## Not Enough Disk Space details summary b EXPAND to see symptom, cause, and solution. ### Symptom 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 to scan: `“files_failed_to_scan”: {{integer}}` - Part of the scan summary ### Causes 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. ### Resolution Free up disk space and run the scan again. ## Populated output with empty scan result details summary b EXPAND to see symptom, cause, and solution. ### Symptom After invoking Supply Chain 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" } ] ``` ### Cause - Supply Chain CLI does not recognize the model type. ### Resolution - This is expected behavior if Supply Chain CLI does not support the given model’s type. - If Supply Chain CLI does support the input model’s type, please contact HiddenLayer Support for next steps. ## Product License is Missing details summary b EXPAND to see symptom, cause, and solution. ### Symptom After invoking Supply Chain 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"} ``` ### Cause - Supply Chain CLI requires a valid product license to be provided in the HL_LICENSE environment variable with the argument `-e HL_LICENSE`. ### Resolution - Contact your HiddenLayer representative to obtain a valid product license. Then provide the license key in the HL_LICENSE environment variable or pass. ## Log Level details summary b EXPAND to see symptom, cause, and solution. About Log Content - Log content is generally only useful for debugging and understanding error conditions. - Log content is not fixed and may vary between versions of Supply Chain CLI. - Customers should not rely on the presence, or absence, of specific log messages or content. ### Default - Supply Chain CLI’s default log level is `error`. - This level is relatively terse; it causes Supply Chain CLI to only emit the most important log messages during execution. ### Change the Default Verbose Log Level - Running Supply Chain 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_LEVEL` environment variable. - Note: This example runs the latest Supply Chain CLI image. Change the Supply Chain CLI version if you want to pull a different Supply Chain 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 ```