Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running keras_fashion_mnist notebook #98

Open
davidmakovoz opened this issue Feb 4, 2024 Discussed in #97 · 0 comments
Open

Error running keras_fashion_mnist notebook #98

davidmakovoz opened this issue Feb 4, 2024 Discussed in #97 · 0 comments

Comments

@davidmakovoz
Copy link

davidmakovoz commented Feb 4, 2024

Discussed in #97

Originally posted by davidmakovoz February 2, 2024
Running !modelscan -p ./KerasModels/safe_model.h5 cell I'm getting this error:

No settings file detected at C:\Users\admin2\Documents\Jupyter\modelscan-main\notebooks\modelscan-settings.toml. Using defaults.

Scanning C:\Users\admin2\Documents\Jupyter\modelscan-main\notebooks\KerasModels\safe_model.h5 using modelscan.scanners.H5LambdaDetectScan model scan

--- Summary ---

Error generating report using modelscan.reports.ConsoleReport: 'charmap' codec can't encode character '\U0001f389' in position 18: character maps to

It looks like the notebook is choking on 🎉.
I tried

%%capture captured_output
!modelscan --path PyTorchModels/safe_model.pt

and

import subprocess

completed_process = subprocess.run(
    ['modelscan', '--path', 'PyTorchModels/safe_model.pt'],
    stdout=subprocess.PIPE,  
    stderr=subprocess.PIPE,  
    text=True # I tried False, as well

Still getting back

"No settings file detected at C:\Users\admin2\Documents\Jupyter\modelscan-main\notebooks\modelscan-settings.toml. Using defaults. \r\n\r\nScanning C:\Users\admin2\Documents\Jupyter\modelscan-main\notebooks\PyTorchModels\safe_model.pt:safe_model/data.pkl using modelscan.scanners.PickleUnsafeOpScan model scan\r\n\r\n--- Summary ---\r\n\r\nError generating report using modelscan.reports.ConsoleReport: 'charmap' codec can't encode character '\U0001f389' in position 18: character maps to \r\n"

The problem is that even on the command line I don't get the happy emoji:

(protectai) C:\Users\admin2\Documents\Jupyter\modelscan-main\notebooks>modelscan -p ./KerasModels/safe_model.h5
No settings file detected at C:\Users\admin2\Documents\Jupyter\modelscan-main\notebooks\modelscan-settings.toml. Using defaults.

Scanning C:\Users\admin2\Documents\Jupyter\modelscan-main\notebooks\KerasModels\safe_model.h5 using modelscan.scanners.H5LambdaDetectScan model scan

--- Summary ---

 No issues found!  ��
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant