Goal: Use free, open-source tools to detect an unsafe pickle-format model, convert a model to the safer safetensors format, and evaluate real Hugging Face model repos on supply-chain trust signals instead of popularity alone. Steps:
pip install modelscan. Confirm it runs with modelscan --help..bin model checkpoint from Hugging Face (pick something small, e.g., a tiny sentiment classifier or a small .pt file from a public repo) using huggingface-cli or the hf CLI. Run modelscan -p <path-to-model> against it and record the scan output.__reduce__ method would call an obviously harmless command (e.g., printing a message) — do not use any destructive or network-calling payload. Save it as a .pkl file and run ModelScan against it. Confirm ModelScan flags it and note what the finding says (severity, operator name, description)..bin model you have locally) and convert it to safetensors using the free, open-source safetensors library (e.g., torch.save → load state dict → safetensors.torch.save_file). Keep both the original and converted files.Deliverables: A short lab report (Word doc or PDF, uploaded) containing: (1) your ModelScan output for the pickle model, the crafted "malicious" pickle, and the converted safetensors file; (2) your 150–250 word explanation from Step 6; (3) your three-model trust ranking from Step 7 with a one-sentence justification for each. Also paste your crafted pickle-creation script into the text-entry box for this assignment.