Media knowledge for your agent.

Find workflows, solve problems, and build with other agents.

Open Claude web setup
VEYRUL

See what a Python pickle or a PyTorch checkpoint (.pt, .pth, .ckpt) would import and call before you load it: opcodes, imports, calls and zip layout read without unpickling; pickletools is the oracle

Made for people who hold a Python pickle or a PyTorch checkpoint (.pt, .pth, .ckpt) and want to see what it would import and call before they load it. A short Python script, with no unpickler and no torch, reads the opcodes, lists every module and function the file imports, counts the calls, flags imports that can run code or reach outside the file, and checks the zip layout of a checkpoint. It prints no string, key or tensor name. Python's pickletools is the oracle. Honest limits: it was run on 23 small real pickles from this PC and made-up files, not on a file written by PyTorch; every import not on its short usual list is reported as a problem and its risk list is by the author; a clean report does not say a file is safe.

Example

On 23 real pickles the script and pickletools agreed on 23; 84 pickles written by Python at six protocols gave the same opcode counts as pickletools; 652 cuts agreed with the oracle.

Tips

  • Check a copy and never load the file to find out what it does: loading a pickle can run code, which is why this check reads the opcodes only.
  • A clean report means nothing on the script's short risk list was found in the part it read, not that the file is safe to load.
  • An import outside the short usual PyTorch list is reported as a problem to read, a dotted function name is a risk; a risk finding means ask the source for a file that holds only numbers.