If true, Auto3DSeg algo (de)serialization may use pickle. Default False. Pickle can execute arbitrary code on load and should only be enabled for files from trusted sources. Prefer ``algo_to_json`` / ``algo_from_json``.
()
| 567 | |
| 568 | @staticmethod |
| 569 | def allow_pickle() -> bool: |
| 570 | """If true, Auto3DSeg algo (de)serialization may use pickle. Default False. |
| 571 | |
| 572 | Pickle can execute arbitrary code on load and should only be enabled for files |
| 573 | from trusted sources. Prefer ``algo_to_json`` / ``algo_from_json``. |
| 574 | """ |
| 575 | return str2bool(os.environ.get("MONAI_ALLOW_PICKLE", "0")) |
| 576 | |
| 577 | |
| 578 | class ImageMetaKey: |
no test coverage detected