Instructions to use pragnyanramtha/keras-native-nonlayer-lambda-modelscan-bypass-poc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use pragnyanramtha/keras-native-nonlayer-lambda-modelscan-bypass-poc with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://pragnyanramtha/keras-native-nonlayer-lambda-modelscan-bypass-poc") - Notebooks
- Google Colab
- Kaggle
File size: 1,630 Bytes
85e09c7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | {
"artifact": "/workspace/keras_native/hf_keras_native_vectorized_map_poc/vectorized_map_lambda.keras",
"keras_version": "3.14.1",
"lambda_paths": [
"$.config.layers[1].config.function"
],
"marker_after_safe_mode_false_load": true,
"marker_after_safe_mode_false_load_content": "VECTORIZED_MAP_MARKER",
"marker_after_safe_mode_true": false,
"marker_after_unsafe_inference": true,
"modelscan_issues": [],
"modelscan_returncode": 0,
"modelscan_skipped": {
"skipped_files": [
{
"category": "SCAN_NOT_SUPPORTED",
"description": "Model Scan did not scan file",
"source": "vectorized_map_lambda.keras:metadata.json"
},
{
"category": "SCAN_NOT_SUPPORTED",
"description": "Model Scan did not scan file",
"source": "vectorized_map_lambda.keras:config.json"
},
{
"category": "MODEL_CONFIG",
"description": "Model Config not found",
"source": "vectorized_map_lambda.keras:model.weights.h5"
}
],
"total_skipped": 3
},
"modelscan_total_issues": 0,
"modelscan_version": "0.8.8",
"safe_mode_false_load": "loaded",
"safe_mode_true": "blocked:ValueError:Requested the deserialization of a Python lambda. This carries a potential risk of arbitrary code execution and thus it is disallowed by default. If you trust the source of the artifact, you can override this error by passing `safe_mode=False` to the loading function, or calling `keras.config.enable_unsafe_deserialization().",
"sha256": "536334212fdea8cf9a19cf71d0c4decd74442116eb31ee39aab0c9d28b13757e",
"unsafe_inference": "ok"
}
|