diff --git a/notebooks/pytorch_sentiment_analysis.ipynb b/notebooks/pytorch_sentiment_analysis.ipynb index d78a580..f30f15a 100644 --- a/notebooks/pytorch_sentiment_analysis.ipynb +++ b/notebooks/pytorch_sentiment_analysis.ipynb @@ -42,9 +42,6 @@ "name": "stdout", "output_type": "stream", "text": [ - "Note: you may need to restart the kernel to use updated packages.\n", - "Note: you may need to restart the kernel to use updated packages.\n", - "Note: you may need to restart the kernel to use updated packages.\n" ] } ], @@ -148,17 +145,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "No settings file detected at /Users/candiedcode/Code/modelscan/notebooks/modelscan-settings.toml. Using defaults. \n", - "\n", - "Scanning /Users/candiedcode/Code/modelscan/notebooks/PyTorchModels/safe_model.pt:safe_model/data.pkl using modelscan.scanners.PickleUnsafeOpScan model scan\n", - "\n", - "\u001b[34m--- Summary ---\u001b[0m\n", - "\n", - "\u001b[32m No issues found! 🎉\u001b[0m\n", - "\n", - "\u001b[34m--- Skipped --- \u001b[0m\n", - "\n", - "Total skipped: \u001b[1;36m204\u001b[0m - run with --show-skipped to see the full list.\n" + "No settings file detected at /Users/mehrinkiani/Documents/modelscan/notebooks/modelscan-settings.toml. Using defaults. \n", + "\n", + "Scanning /Users/mehrinkiani/Documents/modelscan/notebooks/PyTorchModels/safe_model.pt:safe_model/data.pkl using modelscan.scanners.PickleUnsafeOpScan model scan\n", + "\n", + "\u001b[34m--- Summary ---\u001b[0m\n", + "\n", + "\u001b[32m No issues found! 🎉\u001b[0m\n" ] } ], @@ -215,13 +208,8 @@ "name": "stderr", "output_type": "stream", "text": [ - "cat: /Users/candiedcode/.aws/secrets: No such file or directory\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "aws_access_key_id=\n", + "aws_secret_access_key=\n", "The overall sentiment is: negative with a score of: 85.9%\n" ] } @@ -250,33 +238,29 @@ "name": "stdout", "output_type": "stream", "text": [ - "No settings file detected at /Users/candiedcode/Code/modelscan/notebooks/modelscan-settings.toml. Using defaults. \n", - "\n", - "Scanning /Users/candiedcode/Code/modelscan/notebooks/PyTorchModels/unsafe_model.pt:unsafe_model/data.pkl using modelscan.scanners.PickleUnsafeOpScan model scan\n", - "\n", - "\u001b[34m--- Summary ---\u001b[0m\n", - "\n", - "Total Issues: \u001b[1;36m1\u001b[0m\n", - "\n", - "Total Issues By Severity:\n", - "\n", - " - LOW: \u001b[1;32m0\u001b[0m\n", - " - MEDIUM: \u001b[1;32m0\u001b[0m\n", - " - HIGH: \u001b[1;32m0\u001b[0m\n", - " - CRITICAL: \u001b[1;36m1\u001b[0m\n", - "\n", - "\u001b[34m--- Issues by Severity ---\u001b[0m\n", - "\n", - "\u001b[34m--- CRITICAL ---\u001b[0m\n", - "\n", - "Unsafe operator found:\n", - " - Severity: CRITICAL\n", - " - Description: Use of unsafe operator 'system' from module 'posix'\n", - " - Source: /Users/candiedcode/Code/modelscan/notebooks/PyTorchModels/unsafe_model.pt:unsafe_model/data.pkl\n", - "\n", - "\u001b[34m--- Skipped --- \u001b[0m\n", - "\n", - "Total skipped: \u001b[1;36m204\u001b[0m - run with --show-skipped to see the full list.\n" + "No settings file detected at /Users/mehrinkiani/Documents/modelscan/notebooks/modelscan-settings.toml. Using defaults. \n", + "\n", + "Scanning /Users/mehrinkiani/Documents/modelscan/notebooks/PyTorchModels/unsafe_model.pt:unsafe_model/data.pkl using modelscan.scanners.PickleUnsafeOpScan model scan\n", + "\n", + "\u001b[34m--- Summary ---\u001b[0m\n", + "\n", + "Total Issues: \u001b[1;36m1\u001b[0m\n", + "\n", + "Total Issues By Severity:\n", + "\n", + " - LOW: \u001b[1;32m0\u001b[0m\n", + " - MEDIUM: \u001b[1;32m0\u001b[0m\n", + " - HIGH: \u001b[1;32m0\u001b[0m\n", + " - CRITICAL: \u001b[1;36m1\u001b[0m\n", + "\n", + "\u001b[34m--- Issues by Severity ---\u001b[0m\n", + "\n", + "\u001b[34m--- CRITICAL ---\u001b[0m\n", + "\n", + "Unsafe operator found:\n", + " - Severity: CRITICAL\n", + " - Description: Use of unsafe operator 'system' from module 'posix'\n", + " - Source: /Users/mehrinkiani/Documents/modelscan/notebooks/PyTorchModels/unsafe_model.pt:unsafe_model/data.pkl\n" ] } ], @@ -310,19 +294,21 @@ "name": "stdout", "output_type": "stream", "text": [ - "No settings file detected at /Users/candiedcode/Code/modelscan/notebooks/modelscan-settings.toml. Using defaults. \n", - "\n", - "Scanning /Users/candiedcode/Code/modelscan/notebooks/PyTorchModels/unsafe_model.pt:unsafe_model/data.pkl using modelscan.scanners.PickleUnsafeOpScan model scan\n", - "\u001b[1m{\u001b[0m\u001b[32m\"summary\"\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m\"total_issues_by_severity\"\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m\"LOW\"\u001b[0m: \u001b[1;36m0\u001b[0m, \u001b[32m\"MEDIUM\"\u001b[0m: \u001b[1;36m0\u001b[0m, \u001b[32m\"HIGH\"\u001b[0m: \u001b[1;36m0\u001b[0m, \n", - "\u001b[32m\"CRITICAL\"\u001b[0m: \u001b[1;36m1\u001b[0m\u001b[1m}\u001b[0m, \u001b[32m\"total_issues\"\u001b[0m: \u001b[1;36m1\u001b[0m, \u001b[32m\"input_path\"\u001b[0m: \n", - "\u001b[32m\"./PyTorchModels/unsafe_model.pt\"\u001b[0m, \u001b[32m\"absolute_path\"\u001b[0m: \n", - "\u001b[32m\"/Users/candiedcode/Code/modelscan/notebooks/PyTorchModels\"\u001b[0m\n", - ", \u001b[32m\"modelscan_version\"\u001b[0m: \u001b[32m\"0.0.0\"\u001b[0m, \u001b[32m\"timestamp\"\u001b[0m: \u001b[32m\"2024-04-06T08:32:44.102497\"\u001b[0m, \n", - "\u001b[32m\"scanned\"\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m\"total_scanned\"\u001b[0m: \u001b[1;36m1\u001b[0m, \u001b[32m\"scanned_files\"\u001b[0m: \n", - "\u001b[1m[\u001b[0m\u001b[32m\"unsafe_model.pt:unsafe_model/data.pkl\"\u001b[0m\u001b[1m]\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m, \u001b[32m\"issues\"\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m{\u001b[0m\u001b[32m\"description\"\u001b[0m: \u001b[32m\"Use of \u001b[0m\n", - "\u001b[32munsafe operator 'system' from module 'posix'\"\u001b[0m, \u001b[32m\"operator\"\u001b[0m: \u001b[32m\"system\"\u001b[0m, \u001b[32m\"module\"\u001b[0m: \n", - "\u001b[32m\"posix\"\u001b[0m, \u001b[32m\"source\"\u001b[0m: \u001b[32m\"unsafe_model.pt:unsafe_model/data.pkl\"\u001b[0m, \u001b[32m\"scanner\"\u001b[0m: \n", - "\u001b[32m\"modelscan.scanners.PickleUnsafeOpScan\"\u001b[0m, \u001b[32m\"severity\"\u001b[0m: \u001b[32m\"CRITICAL\"\u001b[0m\u001b[1m}\u001b[0m\u001b[1m]\u001b[0m, \u001b[32m\"errors\"\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m\u001b[1m}\u001b[0m\n" + "No settings file detected at /Users/mehrinkiani/Documents/modelscan/notebooks/modelscan-settings.toml. Using defaults. \n", + "\n", + "Scanning /Users/mehrinkiani/Documents/modelscan/notebooks/PyTorchModels/unsafe_model.pt:unsafe_model/data.pkl using modelscan.scanners.PickleUnsafeOpScan model scan\n", + "\u001b[1m{\u001b[0m\u001b[32m\"modelscan_version\"\u001b[0m: \u001b[32m\"0.5.0\"\u001b[0m, \u001b[32m\"timestamp\"\u001b[0m: \u001b[32m\"2024-01-25T17:10:54.306065\"\u001b[0m, \n", + "\u001b[32m\"input_path\"\u001b[0m: \n", + "\u001b[32m\"/Users/mehrinkiani/Documents/modelscan/notebooks/PyTorchModels/unsafe_model.pt\"\u001b[0m\n", + ", \u001b[32m\"total_issues\"\u001b[0m: \u001b[1;36m1\u001b[0m, \u001b[32m\"summary\"\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m\"total_issues_by_severity\"\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m\"LOW\"\u001b[0m: \u001b[1;36m0\u001b[0m, \n", + "\u001b[32m\"MEDIUM\"\u001b[0m: \u001b[1;36m0\u001b[0m, \u001b[32m\"HIGH\"\u001b[0m: \u001b[1;36m0\u001b[0m, \u001b[32m\"CRITICAL\"\u001b[0m: \u001b[1;36m1\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m, \u001b[32m\"issues_by_severity\"\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m\"CRITICAL\"\u001b[0m: \n", + "\u001b[1m[\u001b[0m\u001b[1m{\u001b[0m\u001b[32m\"description\"\u001b[0m: \u001b[32m\"Use of unsafe operator 'system' from module 'posix'\"\u001b[0m, \n", + "\u001b[32m\"operator\"\u001b[0m: \u001b[32m\"system\"\u001b[0m, \u001b[32m\"module\"\u001b[0m: \u001b[32m\"posix\"\u001b[0m, \u001b[32m\"source\"\u001b[0m: \n", + "\u001b[32m\"/Users/mehrinkiani/Documents/modelscan/notebooks/PyTorchModels/unsafe_model.pt:\u001b[0m\n", + "\u001b[32munsafe_model/data.pkl\"\u001b[0m, \u001b[32m\"scanner\"\u001b[0m: \u001b[32m\"modelscan.scanners.PickleUnsafeOpScan\"\u001b[0m\u001b[1m}\u001b[0m\u001b[1m]\u001b[0m\u001b[1m}\u001b[0m, \n", + "\u001b[32m\"errors\"\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m, \u001b[32m\"scanned\"\u001b[0m: \u001b[1m{\u001b[0m\u001b[32m\"total_scanned\"\u001b[0m: \u001b[1;36m1\u001b[0m, \u001b[32m\"scanned_files\"\u001b[0m: \n", + "\u001b[1m[\u001b[0m\u001b[32m\"/Users/mehrinkiani/Documents/modelscan/notebooks/PyTorchModels/unsafe_model.pt\u001b[0m\n", + "\u001b[32m:unsafe_model/data.pkl\"\u001b[0m\u001b[1m]\u001b[0m\u001b[1m}\u001b[0m\u001b[1m}\u001b[0m\n" ] } ],