@@ -22,7 +22,7 @@ Fickling can be used both as a **python library** and a **CLI**.
2222
2323## Installation
2424
25- Fickling has been tested on Python 3.8 through Python 3.11 and has very few dependencies.
25+ Fickling has been tested on Python 3.8 through Python 3.13 and has very few dependencies.
2626Both the library and command line utility can be installed through pip:
2727
2828``` bash
@@ -38,7 +38,7 @@ python -m pip install fickling[torch]
3838
3939## Securing AI/ML environments
4040
41- Fickling can help securing AI/ML codebases by automatically scanning pickle files contained in
41+ Fickling can help securing AI/ML codebases by automatically scanning pickle files contained in
4242models. Fickling hooks the pickle module and verifies imports made when loading a model. It only
4343checks the imports against an allowlist of imports from ML libraries that are considered safe, and blocks files that contain other imports.
4444
@@ -50,7 +50,7 @@ import fickling
5050fickling.hook.activate_safe_ml_environment()
5151```
5252
53- To remove the protection:
53+ To remove the protection:
5454
5555``` python
5656fickling.hook.deactivate_safe_ml_environment()
@@ -82,7 +82,7 @@ raises an `UnsafeFileError` exception if malicious content is detected in the fi
8282# This enforces safety checks every time pickle.load() is used
8383fickling.always_check_safety()
8484
85- # Attempt to load an unsafe file now raises an exception
85+ # Attempt to load an unsafe file now raises an exception
8686with open (" file.pkl" , " rb" ) as f:
8787 try :
8888 pickle.load(f)
@@ -108,7 +108,7 @@ pickle.load("file.pkl")
108108#### Option 3: check and load a single file
109109
110110``` python
111- # Use fickling.load() in place of pickle.load() to check safety and load a single pickle file
111+ # Use fickling.load() in place of pickle.load() to check safety and load a single pickle file
112112try :
113113 fickling.load(" file.pkl" )
114114except fickling.UnsafeFileError as e:
@@ -201,8 +201,8 @@ Module(
201201
202202### PyTorch polyglots
203203
204- PyTorch contains multiple file formats with which one can make polyglot files, which
205- are files that can be validly interpreted as more than one file format.
204+ PyTorch contains multiple file formats with which one can make polyglot files, which
205+ are files that can be validly interpreted as more than one file format.
206206Fickling supports identifying, inspecting, and creating polyglots with the
207207following PyTorch file formats:
208208
@@ -223,7 +223,7 @@ following PyTorch file formats:
223223>> torch.save(model, " mobilenet.pth" )
224224>> fickled_model = PyTorchModelWrapper(" mobilenet.pth" )
225225>> print (fickled_model.formats)
226- Your file is most likely of this format : PyTorch v1.3
226+ Your file is most likely of this format : PyTorch v1.3
227227[' PyTorch v1.3' ]
228228```
229229
0 commit comments