qairt-visualizer 0.5.1__py3-none-win_amd64.whl → 0.6.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qairt_visualizer/core/helpers/version.py +23 -0
- qairt_visualizer/core/launchers/base_ui_launcher_context.py +28 -7
- qairt_visualizer/core/launchers/electron_launcher_context.py +72 -3
- qairt_visualizer/core/parsers/dlc_parser/dlc_parser.py +105 -33
- qairt_visualizer/core/parsers/dlc_parser/get_source_topology.py +47 -0
- qairt_visualizer/core/parsers/dlc_parser/libDlModelToolsPy.pyd +0 -0
- qairt_visualizer/core/parsers/dlc_parser/libDlModelToolsPy.so +0 -0
- qairt_visualizer/core/parsers/dlc_parser/libPyIrGraph.pyd +0 -0
- qairt_visualizer/core/parsers/dlc_parser/libPyIrGraph.so +0 -0
- qairt_visualizer/core/parsers/dlc_parser/models/op_tensor_mappings.py +8 -4
- qairt_visualizer/core/ui/dist/browser/__init__.py +47 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/acuity.js → acuity.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/app.js → app.js} +63 -57
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/armnn-schema.js → armnn-schema.js} +590 -5
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/armnn.js → armnn.js} +3 -5
- qairt_visualizer/core/ui/dist/browser/assets/i18n/common/en.json +8 -2
- qairt_visualizer/core/ui/dist/browser/assets/i18n/graph/en.json +32 -36
- qairt_visualizer/core/ui/dist/browser/assets/i18n/panels/en.json +9 -3
- qairt_visualizer/core/ui/dist/browser/assets/i18n/panels/model-diff/en.json +6 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/barracuda.js → barracuda.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/base.js → base.js} +20 -16
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/bigdl.js → bigdl.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/browser.js → browser.js} +59 -49
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe.js → caffe.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe2-proto.js → caffe2-proto.js} +26 -26
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe2.js → caffe2.js} +113 -114
- qairt_visualizer/core/ui/dist/browser/chunk-3SMGFPTN.js +11 -0
- qairt_visualizer/core/ui/dist/browser/chunk-43LQFSHA.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-447NKSFT.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-5MAR72QP.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-7PTY53DS.js +5 -0
- qairt_visualizer/core/ui/dist/browser/chunk-GAUD627J.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-H7TLLCSI.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-HISUA6LZ.js +4 -0
- qairt_visualizer/core/ui/dist/browser/chunk-HXB7IAZI.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-L3QJ7DR2.js +1 -0
- qairt_visualizer/core/ui/dist/browser/chunk-M7SD7HRU.js +129 -0
- qairt_visualizer/core/ui/dist/browser/{chunk-HBP6TEQ6.js → chunk-MCR4N53U.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/chunk-QD7PA2I4.js +19 -0
- qairt_visualizer/core/ui/dist/browser/chunk-TKZG6FLW.js +12 -0
- qairt_visualizer/core/ui/dist/browser/chunk-WFAVWONI.js +5 -0
- qairt_visualizer/core/ui/dist/browser/chunk-WRMDGTCT.js +35 -0
- qairt_visualizer/core/ui/dist/browser/chunk-X25J6H7V.js +1 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/circle-schema.js → circle-schema.js} +17 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/circle.js → circle.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/cntk.js → cntk.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/coreml-proto.js → coreml-proto.js} +1 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/coreml.js → coreml.js} +24 -21
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dagre.js → dagre.js} +5 -5
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/darknet-metadata.json → darknet-metadata.json} +0 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/darknet.js → darknet.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/electron.mjs → desktop.mjs} +44 -131
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dl4j.js → dl4j.js} +5 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dlc-schema.js → dlc-schema.js} +8 -8
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dlc.js → dlc.js} +110 -29
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dnn.js → dnn.js} +2 -4
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dot.js → dot.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/espresso.js → espresso.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/executorch-schema.js → executorch-schema.js} +363 -42
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/executorch.js → executorch.js} +108 -40
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flatbuffers.js → flatbuffers.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flax.js → flax.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flux.js → flux.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/gguf.js → gguf.js} +44 -24
- qairt_visualizer/core/ui/dist/browser/grapher.css +145 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/grapher.js → grapher.js} +24 -48
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/hailo.js → hailo.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/hickle.js → hickle.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/imgdnn.js → imgdnn.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/index.html +15 -16
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/index.js → index.js} +2 -24
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/json.js → json.js} +28 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/kann.js → kann.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/keras-metadata.json → keras-metadata.json} +15 -7
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/keras.js → keras.js} +13 -7
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/kmodel.js → kmodel.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/lasagne.js → lasagne.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/lightgbm.js → lightgbm.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/main-VGWU2273.js +1 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mediapipe.js → mediapipe.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/megengine.js → megengine.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/message.js → message.js} +3 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mlir.js → mlir.js} +53 -17
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mlnet.js → mlnet.js} +2 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mnn-schema.js → mnn-schema.js} +9 -6
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mnn.js → mnn.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mslite.js → mslite.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mxnet.js → mxnet.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/ncnn.js → ncnn.js} +3 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnabla.js → nnabla.js} +4 -4
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnef.js → nnef.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/node.js +102 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/numpy.js → numpy.js} +9 -9
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/om.js → om.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onednn.js → onednn.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onnx-metadata.json → onnx-metadata.json} +3500 -233
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onnx-proto.js → onnx-proto.js} +436 -4
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onnx.js → onnx.js} +284 -199
- qairt_visualizer/core/ui/dist/browser/onnx.py +231 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/openvino.js → openvino.js} +36 -31
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/paddle-proto.js → paddle-proto.js} +54 -54
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/paddle.js → paddle.js} +22 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pickle.js → pickle.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/python.js → python.js} +743 -325
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pytorch-metadata.json → pytorch-metadata.json} +3217 -2934
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pytorch-proto.js → pytorch-proto.js} +4 -4
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pytorch.js → pytorch.js} +172 -86
- qairt_visualizer/core/ui/dist/browser/pytorch.py +304 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/qnn.js → qnn.js} +6 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/rknn.js → rknn.js} +3 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/safetensors.js → safetensors.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/sentencepiece.js → sentencepiece.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/server.py → server.py} +95 -103
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/sklearn-metadata.json → sklearn-metadata.json} +15 -10
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/sklearn.js → sklearn.js} +5 -5
- qairt_visualizer/core/ui/dist/browser/{styles-MRR6DOT2.css → styles-52VQCFP5.css} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tar.js → tar.js} +18 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tengine.js → tengine.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tensorrt.js → tensorrt.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tf-metadata.json → tf-metadata.json} +1255 -163
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tf-proto.js → tf-proto.js} +46 -12
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tf.js → tf.js} +36 -13
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tflite.js → tflite.js} +18 -21
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tnn.js → tnn.js} +1 -3
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/torch.js → torch.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/transformers.js +171 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tvm.js → tvm.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/uff.js → uff.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/view.js → view.js} +1405 -1115
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/weka.js → weka.js} +3 -4
- qairt_visualizer/core/ui/dist/browser/worker-CECUQ4FG.js +1 -0
- qairt_visualizer/core/ui/dist/browser/worker-IGSZ74QJ.js +4 -0
- qairt_visualizer/core/ui/dist/browser/xgboost.js +59 -0
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/xml.js → xml.js} +2 -2
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/xmodel.js → xmodel.js} +1 -1
- qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/zip.js → zip.js} +38 -41
- qairt_visualizer/core/ui/dist/qairt_visualizer.exe +0 -0
- qairt_visualizer/core/ui/dist/resources/app.asar +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/METADATA +1 -1
- qairt_visualizer-0.6.0.dist-info/RECORD +264 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/CITATION.cff +0 -10
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/CONTRIBUTING.md +0 -29
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/LICENSE +0 -21
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/README.md +0 -36
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/jenkins/Jenkinsfile +0 -69
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/package-lock.json +0 -5743
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/package.js +0 -689
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/package.json +0 -53
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/package.py +0 -87
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/background.png +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/background.svg +0 -5
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/background@2x.png +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/electron-builder.json +0 -109
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/eslint.config.js +0 -231
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/forge.config.js +0 -87
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.html +0 -27
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.icns +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.icns.svg +0 -175
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.ico +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.png +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/icon.svg +0 -179
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/notarize.cjs +0 -24
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/pyproject.toml +0 -63
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/publish/setup.py +0 -43
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/resolve_upgrade_merge.sh +0 -10
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/__init__.py +0 -41
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/cambricon.js +0 -32
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/favicon.ico +0 -0
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/grapher.css +0 -602
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/index.html +0 -2222
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/modular.js +0 -81
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/onnx.py +0 -227
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/pytorch.py +0 -298
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/qais/qcontrol.js +0 -207
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/qais/qgraph-toolkit.js +0 -123
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/qais/qsubgraph.js +0 -226
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/qais/qsummary-panel.js +0 -89
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/source/server.js +0 -250
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/backend.py +0 -80
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/measures.py +0 -27
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/models.js +0 -359
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/models.json +0 -8523
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/test/worker.js +0 -859
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/armnn +0 -33
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/bigdl +0 -33
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/caffe +0 -37
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/caffe-script.js +0 -12
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/circle +0 -43
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/circle-script.js +0 -87
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/circle_script.js +0 -73
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/cntk +0 -33
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/coreml +0 -49
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/dlc +0 -20
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/dlc.fbs +0 -165
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/dnn +0 -20
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/dnn.proto +0 -79
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/executorch +0 -41
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/flatc.js +0 -1315
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/gguf +0 -22
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/kann +0 -33
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/keras +0 -62
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/keras_metadata.py +0 -205
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/keras_script.py +0 -204
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mediapipe +0 -72
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/megengine +0 -47
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/megengine-script.js +0 -113
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/megengine_script.js +0 -112
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mnn +0 -40
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mslite +0 -45
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mslite-script.js +0 -83
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/mslite_metadata.js +0 -82
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/nnabla +0 -79
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/nnabla_script.py +0 -145
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/om +0 -26
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/om.proto +0 -204
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/onnx +0 -135
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/onnx_metadata.py +0 -233
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/onnx_script.py +0 -332
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/paddle +0 -38
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/protoc.js +0 -1609
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/pytorch +0 -85
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/pytorch_metadata.py +0 -166
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/pytorch_script.py +0 -404
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/rknn +0 -20
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/rknn.fbs +0 -78
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/sentencepiece +0 -39
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/sklearn +0 -65
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/sklearn_metadata.py +0 -126
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/sklearn_script.py +0 -129
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tf +0 -97
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tf_metadata.py +0 -403
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tf_script.py +0 -422
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tflite-script.js +0 -87
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/tflite_metadata.js +0 -73
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/uff +0 -20
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/uff.proto +0 -127
- qairt_visualizer/core/ui/dist/browser/assets/netron_plugin/tools/xmodel +0 -36
- qairt_visualizer/core/ui/dist/browser/chunk-3NAQCYEU.js +0 -1
- qairt_visualizer/core/ui/dist/browser/chunk-NFKTPX3Z.js +0 -11
- qairt_visualizer/core/ui/dist/browser/chunk-OMI6HJ5Y.js +0 -19
- qairt_visualizer/core/ui/dist/browser/chunk-TTZXMRJ5.js +0 -34
- qairt_visualizer/core/ui/dist/browser/main-NXPVOKMG.js +0 -1
- qairt_visualizer/core/ui/dist/browser/worker-5VPKG2GV.js +0 -4
- qairt_visualizer/core/ui/dist/browser/worker-UVGWDZ5K.js +0 -1
- qairt_visualizer-0.5.1.dist-info/RECORD +0 -337
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/acuity-metadata.json → acuity-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/armnn-metadata.json → armnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/bigdl-metadata.json → bigdl-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/bigdl-proto.js → bigdl-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe-metadata.json → caffe-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe-proto.js → caffe-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/caffe2-metadata.json → caffe2-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/catboost.js → catboost.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/circle-metadata.json → circle-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/cntk-metadata.json → cntk-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/cntk-proto.js → cntk-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/coreml-metadata.json → coreml-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dl4j-metadata.json → dl4j-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dlc-metadata.json → dlc-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dnn-metadata.json → dnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/dnn-proto.js → dnn-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/espresso-metadata.json → espresso-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flexbuffers.js → flexbuffers.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/flux-metadata.json → flux-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/hailo-metadata.json → hailo-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/hdf5.js → hdf5.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/icon.png → icon.png} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/kann-metadata.json → kann-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/kann-schema.js → kann-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/keras-proto.js → keras-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/lasagne-metadata.json → lasagne-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/megengine-metadata.json → megengine-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/megengine-schema.js → megengine-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mlnet-metadata.json → mlnet-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mnn-metadata.json → mnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mslite-metadata.json → mslite-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mslite-schema.js → mslite-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/mxnet-metadata.json → mxnet-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/ncnn-metadata.json → ncnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnabla-metadata.json → nnabla-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnabla-proto.js → nnabla-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/nnc.js → nnc.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/om-metadata.json → om-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/om-proto.js → om-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onednn-metadata.json → onednn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/onnx-schema.js → onnx-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/openvino-metadata.json → openvino-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/paddle-metadata.json → paddle-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/paddle-schema.js → paddle-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/protobuf.js → protobuf.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/pytorch-schema.js → pytorch-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/qnn-metadata.json → qnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/rknn-metadata.json → rknn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/rknn-schema.js → rknn-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/sentencepiece-proto.js → sentencepiece-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tengine-metadata.json → tengine-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/text.js → text.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tflite-metadata.json → tflite-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tflite-schema.js → tflite-schema.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/tnn-metadata.json → tnn-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/torch-metadata.json → torch-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/uff-metadata.json → uff-metadata.json} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/uff-proto.js → uff-proto.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/worker.js → worker.js} +0 -0
- /qairt_visualizer/core/ui/dist/browser/{assets/netron_plugin/source/xmodel-proto.js → xmodel-proto.js} +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/LICENSE.pdf +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/WHEEL +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/entry_points.txt +0 -0
- {qairt_visualizer-0.5.1.dist-info → qairt_visualizer-0.6.0.dist-info}/top_level.txt +0 -0
|
@@ -1,859 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as base from '../source/base.js';
|
|
3
|
-
import * as fs from 'fs/promises';
|
|
4
|
-
import * as path from 'path';
|
|
5
|
-
import * as process from 'process';
|
|
6
|
-
import * as python from '../source/python.js';
|
|
7
|
-
import * as tar from '../source/tar.js';
|
|
8
|
-
import * as url from 'url';
|
|
9
|
-
import * as view from '../source/view.js';
|
|
10
|
-
import * as worker_threads from 'worker_threads';
|
|
11
|
-
import * as zip from '../source/zip.js';
|
|
12
|
-
|
|
13
|
-
const access = async (path) => {
|
|
14
|
-
try {
|
|
15
|
-
await fs.access(path);
|
|
16
|
-
return true;
|
|
17
|
-
} catch {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const dirname = (...args) => {
|
|
23
|
-
const file = url.fileURLToPath(import.meta.url);
|
|
24
|
-
const dir = path.dirname(file);
|
|
25
|
-
return path.join(dir, ...args);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const decompress = (buffer) => {
|
|
29
|
-
let archive = zip.Archive.open(buffer, 'gzip');
|
|
30
|
-
if (archive && archive.entries.size === 1) {
|
|
31
|
-
const stream = archive.entries.values().next().value;
|
|
32
|
-
buffer = stream.peek();
|
|
33
|
-
}
|
|
34
|
-
const formats = [zip, tar];
|
|
35
|
-
for (const module of formats) {
|
|
36
|
-
archive = module.Archive.open(buffer);
|
|
37
|
-
if (archive) {
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return archive;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const host = {};
|
|
45
|
-
|
|
46
|
-
host.TestHost = class {
|
|
47
|
-
|
|
48
|
-
constructor(window, environment) {
|
|
49
|
-
this._window = window;
|
|
50
|
-
this._environment = environment;
|
|
51
|
-
this._errors = [];
|
|
52
|
-
host.TestHost.source = host.TestHost.source || dirname('..', 'source');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async view(/* view */) {
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
async start() {
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
get window() {
|
|
62
|
-
return this._window;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
get document() {
|
|
66
|
-
return this._window.document;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
get errors() {
|
|
70
|
-
return this._errors;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
environment(name) {
|
|
74
|
-
return this._environment[name];
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
screen(/* name */) {
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
async require(id) {
|
|
81
|
-
const file = path.join(host.TestHost.source, `${id}.js`);
|
|
82
|
-
return await import(`file://${file}`);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
worker(id) {
|
|
86
|
-
const file = path.join(host.TestHost.source, `${id}.js`);
|
|
87
|
-
const worker = new worker_threads.Worker(file);
|
|
88
|
-
worker.addEventListener = (type, listener) => {
|
|
89
|
-
worker.on(type, (message) => listener({ data: message }));
|
|
90
|
-
};
|
|
91
|
-
return worker;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
async request(file, encoding, basename) {
|
|
95
|
-
const pathname = path.join(basename || host.TestHost.source, file);
|
|
96
|
-
const exists = await access(pathname);
|
|
97
|
-
if (!exists) {
|
|
98
|
-
throw new Error(`The file '${file}' does not exist.`);
|
|
99
|
-
}
|
|
100
|
-
if (encoding) {
|
|
101
|
-
return await fs.readFile(pathname, encoding);
|
|
102
|
-
}
|
|
103
|
-
const buffer = await fs.readFile(pathname, null);
|
|
104
|
-
return new base.BinaryStream(buffer);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
event(/* name, params */) {
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
exception(error /*, fatal */) {
|
|
111
|
-
this._errors.push(error);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
message() {
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
host.TestHost.Context = class {
|
|
119
|
-
|
|
120
|
-
constructor(host, folder, identifier, stream, entries) {
|
|
121
|
-
this._host = host;
|
|
122
|
-
this._folder = folder;
|
|
123
|
-
this._identifier = identifier;
|
|
124
|
-
this._stream = stream;
|
|
125
|
-
this._entries = entries;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
get identifier() {
|
|
129
|
-
return this._identifier;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
get stream() {
|
|
133
|
-
return this._stream;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
get entries() {
|
|
137
|
-
return this._entries;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
async request(file, encoding, base) {
|
|
141
|
-
return this._host.request(file, encoding, base === undefined ? this._folder : base);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
async require(id) {
|
|
145
|
-
return this._host.require(id);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
error(error, fatal) {
|
|
149
|
-
this._host.exception(error, fatal);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
class CSSStyleDeclaration {
|
|
154
|
-
|
|
155
|
-
constructor() {
|
|
156
|
-
this._properties = new Map();
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
setProperty(name, value) {
|
|
160
|
-
this._properties.set(name, value);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
removeProperty(name) {
|
|
164
|
-
this._properties.delete(name);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
class DOMTokenList {
|
|
169
|
-
|
|
170
|
-
constructor(element) {
|
|
171
|
-
this._element = element;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
add(...tokens) {
|
|
175
|
-
const value = this._element.getAttribute('class') || '';
|
|
176
|
-
tokens = new Set(value.split(' ').concat(tokens));
|
|
177
|
-
this._element.setAttribute('class', Array.from(tokens).join(' '));
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
contains(token) {
|
|
181
|
-
const value = this._element.getAttribute('class');
|
|
182
|
-
if (value === null || value.indexOf(token) === -1) {
|
|
183
|
-
return false;
|
|
184
|
-
}
|
|
185
|
-
return value.split(' ').some((s) => s === token);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
class HTMLElement {
|
|
190
|
-
|
|
191
|
-
constructor() {
|
|
192
|
-
this._childNodes = [];
|
|
193
|
-
this._attributes = new Map();
|
|
194
|
-
this._style = new CSSStyleDeclaration();
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
get style() {
|
|
198
|
-
return this._style;
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
get childNodes() {
|
|
203
|
-
return this._childNodes;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
get firstChild() {
|
|
207
|
-
return this._childNodes.length > 0 ? this._childNodes[0] : null;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
get lastChild() {
|
|
211
|
-
const index = this._childNodes.length - 1;
|
|
212
|
-
if (index >= 0) {
|
|
213
|
-
return this._childNodes[index];
|
|
214
|
-
}
|
|
215
|
-
return null;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
appendChild(node) {
|
|
219
|
-
this._childNodes.push(node);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
insertBefore(newNode, referenceNode) {
|
|
223
|
-
const index = this._childNodes.indexOf(referenceNode);
|
|
224
|
-
if (index !== -1) {
|
|
225
|
-
this._childNodes.splice(index, 0, newNode);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
removeChild(node) {
|
|
230
|
-
const index = this._childNodes.lastIndexOf(node);
|
|
231
|
-
if (index !== -1) {
|
|
232
|
-
this._childNodes.splice(index, 1);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
setAttribute(name, value) {
|
|
237
|
-
this._attributes.set(name, value);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
hasAttribute(name) {
|
|
241
|
-
return this._attributes.has(name);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
getAttribute(name) {
|
|
245
|
-
return this._attributes.has(name) ? this._attributes.get(name) : null;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
getElementsByClassName(name) {
|
|
249
|
-
const elements = [];
|
|
250
|
-
for (const node of this._childNodes) {
|
|
251
|
-
if (node instanceof HTMLElement) {
|
|
252
|
-
elements.push(...node.getElementsByClassName(name));
|
|
253
|
-
if (node.classList.contains(name)) {
|
|
254
|
-
elements.push(node);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return elements;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
addEventListener(/* event, callback */) {
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
removeEventListener(/* event, callback */) {
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
get classList() {
|
|
268
|
-
this._classList = this._classList || new DOMTokenList(this);
|
|
269
|
-
return this._classList;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
getBBox() {
|
|
273
|
-
return { x: 0, y: 0, width: 10, height: 10 };
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
getBoundingClientRect() {
|
|
277
|
-
return { left: 0, top: 0, wigth: 0, height: 0 };
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
scrollTo() {
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
focus() {
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
class Document {
|
|
288
|
-
|
|
289
|
-
constructor() {
|
|
290
|
-
this._elements = {};
|
|
291
|
-
this._documentElement = new HTMLElement();
|
|
292
|
-
this._body = new HTMLElement();
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
get documentElement() {
|
|
296
|
-
return this._documentElement;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
get body() {
|
|
300
|
-
return this._body;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
createElement(/* name */) {
|
|
304
|
-
return new HTMLElement();
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
createElementNS(/* namespace, name */) {
|
|
308
|
-
return new HTMLElement();
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
createTextNode(/* text */) {
|
|
312
|
-
return new HTMLElement();
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
getElementById(id) {
|
|
316
|
-
let element = this._elements[id];
|
|
317
|
-
if (!element) {
|
|
318
|
-
element = new HTMLElement();
|
|
319
|
-
this._elements[id] = element;
|
|
320
|
-
}
|
|
321
|
-
return element;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
addEventListener(/* event, callback */) {
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
removeEventListener(/* event, callback */) {
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
class Window {
|
|
332
|
-
|
|
333
|
-
constructor() {
|
|
334
|
-
this._document = new Document();
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
get document() {
|
|
338
|
-
return this._document;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
addEventListener(/* event, callback */) {
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
removeEventListener(/* event, callback */) {
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
export class Target {
|
|
349
|
-
|
|
350
|
-
constructor(item) {
|
|
351
|
-
Object.assign(this, item);
|
|
352
|
-
this.events = {};
|
|
353
|
-
this.tags = new Set(this.tags);
|
|
354
|
-
this.folder = item.type ? path.normalize(dirname('..', 'third_party' , 'test', item.type)) : process.cwd();
|
|
355
|
-
this.assert = !this.assert || Array.isArray(this.assert) ? this.assert : [this.assert];
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
on(event, callback) {
|
|
359
|
-
this.events[event] = this.events[event] || [];
|
|
360
|
-
this.events[event].push(callback);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
emit(event, data) {
|
|
364
|
-
if (this.events && this.events[event]) {
|
|
365
|
-
for (const callback of this.events[event]) {
|
|
366
|
-
callback(this, data);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
status(message) {
|
|
372
|
-
this.emit('status', message);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
async execute() {
|
|
376
|
-
if (this.measures) {
|
|
377
|
-
this.measures.set('name', this.name);
|
|
378
|
-
}
|
|
379
|
-
await zip.Archive.import();
|
|
380
|
-
this.window = this.window || new Window();
|
|
381
|
-
const environment = {
|
|
382
|
-
zoom: 'none',
|
|
383
|
-
measure: this.measures ? true : false
|
|
384
|
-
};
|
|
385
|
-
this.host = await new host.TestHost(this.window, environment);
|
|
386
|
-
this.view = new view.View(this.host);
|
|
387
|
-
this.view.options.attributes = true;
|
|
388
|
-
this.view.options.initializers = true;
|
|
389
|
-
const time = async (method) => {
|
|
390
|
-
const start = process.hrtime.bigint();
|
|
391
|
-
let err = null;
|
|
392
|
-
try {
|
|
393
|
-
await method.call(this);
|
|
394
|
-
} catch (error) {
|
|
395
|
-
err = error;
|
|
396
|
-
}
|
|
397
|
-
const duration = Number(process.hrtime.bigint() - start) / 1e9;
|
|
398
|
-
if (this.measures) {
|
|
399
|
-
this.measures.set(method.name, duration);
|
|
400
|
-
}
|
|
401
|
-
if (err) {
|
|
402
|
-
throw err;
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
this.status({ name: 'name', target: this.name });
|
|
406
|
-
const errors = [];
|
|
407
|
-
try {
|
|
408
|
-
await time(this.download);
|
|
409
|
-
await time(this.load);
|
|
410
|
-
await time(this.validate);
|
|
411
|
-
if (!this.tags.has('skip-render')) {
|
|
412
|
-
await time(this.render);
|
|
413
|
-
}
|
|
414
|
-
} catch (error) {
|
|
415
|
-
errors.push(error);
|
|
416
|
-
}
|
|
417
|
-
errors.push(...this.host.errors);
|
|
418
|
-
if (errors.length === 0 && this.error) {
|
|
419
|
-
throw new Error('Expected error.');
|
|
420
|
-
}
|
|
421
|
-
if (errors.length > 0 && (!this.error || errors.map((error) => error.message).join('\n') !== this.error)) {
|
|
422
|
-
throw errors[0];
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
async request(url, init) {
|
|
427
|
-
const response = await fetch(url, init);
|
|
428
|
-
if (!response.ok) {
|
|
429
|
-
throw new Error(response.status.toString());
|
|
430
|
-
}
|
|
431
|
-
if (response.body) {
|
|
432
|
-
const reader = response.body.getReader();
|
|
433
|
-
const length = response.headers.has('Content-Length') ? parseInt(response.headers.get('Content-Length'), 10) : -1;
|
|
434
|
-
let position = 0;
|
|
435
|
-
const target = this;
|
|
436
|
-
const stream = new ReadableStream({
|
|
437
|
-
async start(controller) {
|
|
438
|
-
const read = async () => {
|
|
439
|
-
try {
|
|
440
|
-
const result = await reader.read();
|
|
441
|
-
if (result.done) {
|
|
442
|
-
target.status({ name: 'download' });
|
|
443
|
-
controller.close();
|
|
444
|
-
} else {
|
|
445
|
-
position += result.value.length;
|
|
446
|
-
if (length >= 0) {
|
|
447
|
-
const percent = position / length;
|
|
448
|
-
target.status({ name: 'download', target: url, percent });
|
|
449
|
-
} else {
|
|
450
|
-
target.status({ name: 'download', target: url, position });
|
|
451
|
-
}
|
|
452
|
-
controller.enqueue(result.value);
|
|
453
|
-
return await read();
|
|
454
|
-
}
|
|
455
|
-
} catch (error) {
|
|
456
|
-
controller.error(error);
|
|
457
|
-
throw error;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
return null;
|
|
461
|
-
};
|
|
462
|
-
return read();
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
return new Response(stream, {
|
|
466
|
-
status: response.status,
|
|
467
|
-
statusText: response.statusText,
|
|
468
|
-
headers: response.headers
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
return response;
|
|
472
|
-
}
|
|
473
|
-
async download(targets, sources) {
|
|
474
|
-
targets = targets || Array.from(this.targets);
|
|
475
|
-
sources = sources || this.source;
|
|
476
|
-
const files = targets.map((file) => path.resolve(this.folder, file));
|
|
477
|
-
const exists = await Promise.all(files.map((file) => access(file)));
|
|
478
|
-
if (exists.every((value) => value)) {
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
if (!sources) {
|
|
482
|
-
throw new Error('Download source not specified.');
|
|
483
|
-
}
|
|
484
|
-
let source = '';
|
|
485
|
-
let sourceFiles = [];
|
|
486
|
-
const match = sources.match(/^(.*?)\[(.*?)\](.*)$/);
|
|
487
|
-
if (match) {
|
|
488
|
-
[, source, sourceFiles, sources] = match;
|
|
489
|
-
sourceFiles = sourceFiles.split(',').map((file) => file.trim());
|
|
490
|
-
sources = sources && sources.startsWith(',') ? sources.substring(1).trim() : '';
|
|
491
|
-
} else {
|
|
492
|
-
const commaIndex = sources.indexOf(',');
|
|
493
|
-
if (commaIndex === -1) {
|
|
494
|
-
source = sources;
|
|
495
|
-
sources = '';
|
|
496
|
-
} else {
|
|
497
|
-
source = sources.substring(0, commaIndex);
|
|
498
|
-
sources = sources.substring(commaIndex + 1);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
await Promise.all(targets.map((target) => {
|
|
502
|
-
const dir = path.dirname(`${this.folder}/${target}`);
|
|
503
|
-
return fs.mkdir(dir, { recursive: true });
|
|
504
|
-
}));
|
|
505
|
-
const response = await this.request(source);
|
|
506
|
-
const buffer = await response.arrayBuffer();
|
|
507
|
-
const data = new Uint8Array(buffer);
|
|
508
|
-
if (sourceFiles.length > 0) {
|
|
509
|
-
this.status({ name: 'decompress' });
|
|
510
|
-
const archive = decompress(data);
|
|
511
|
-
for (const name of sourceFiles) {
|
|
512
|
-
this.status({ name: 'write', target: name });
|
|
513
|
-
if (name === '.') {
|
|
514
|
-
const target = targets.shift();
|
|
515
|
-
const dir = path.join(this.folder, target);
|
|
516
|
-
/* eslint-disable no-await-in-loop */
|
|
517
|
-
await fs.mkdir(dir, { recursive: true });
|
|
518
|
-
/* eslint-enable no-await-in-loop */
|
|
519
|
-
} else {
|
|
520
|
-
const stream = archive.entries.get(name);
|
|
521
|
-
if (!stream) {
|
|
522
|
-
throw new Error(`Entry not found '${name}. Archive contains entries: ${JSON.stringify(Array.from(archive.entries.keys()))} .`);
|
|
523
|
-
}
|
|
524
|
-
const target = targets.shift();
|
|
525
|
-
const buffer = stream.peek();
|
|
526
|
-
const file = path.join(this.folder, target);
|
|
527
|
-
/* eslint-disable no-await-in-loop */
|
|
528
|
-
await fs.writeFile(file, buffer, null);
|
|
529
|
-
/* eslint-enable no-await-in-loop */
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
} else {
|
|
533
|
-
const target = targets.shift();
|
|
534
|
-
this.status({ name: 'write', target });
|
|
535
|
-
await fs.writeFile(`${this.folder}/${target}`, data, null);
|
|
536
|
-
}
|
|
537
|
-
if (targets.length > 0 && sources.length > 0) {
|
|
538
|
-
await this.download(targets, sources);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
async load() {
|
|
543
|
-
const target = path.resolve(this.folder, this.targets[0]);
|
|
544
|
-
const identifier = path.basename(target);
|
|
545
|
-
const stat = await fs.stat(target);
|
|
546
|
-
let context = null;
|
|
547
|
-
if (stat.isFile()) {
|
|
548
|
-
const buffer = await fs.readFile(target, null);
|
|
549
|
-
const reader = new base.BinaryStream(buffer);
|
|
550
|
-
const dirname = path.dirname(target);
|
|
551
|
-
context = new host.TestHost.Context(this.host, dirname, identifier, reader, new Map());
|
|
552
|
-
} else if (stat.isDirectory()) {
|
|
553
|
-
const entries = new Map();
|
|
554
|
-
const file = async (pathname) => {
|
|
555
|
-
const buffer = await fs.readFile(pathname, null);
|
|
556
|
-
const stream = new base.BinaryStream(buffer);
|
|
557
|
-
const name = pathname.split(path.sep).join(path.posix.sep);
|
|
558
|
-
entries.set(name, stream);
|
|
559
|
-
};
|
|
560
|
-
const walk = async (dir) => {
|
|
561
|
-
const stats = await fs.readdir(dir, { withFileTypes: true });
|
|
562
|
-
const promises = [];
|
|
563
|
-
for (const stat of stats) {
|
|
564
|
-
const pathname = path.join(dir, stat.name);
|
|
565
|
-
if (stat.isDirectory()) {
|
|
566
|
-
promises.push(walk(pathname));
|
|
567
|
-
} else if (stat.isFile()) {
|
|
568
|
-
promises.push(file(pathname));
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
await Promise.all(promises);
|
|
572
|
-
};
|
|
573
|
-
await walk(target);
|
|
574
|
-
context = new host.TestHost.Context(this.host, target, identifier, null, entries);
|
|
575
|
-
}
|
|
576
|
-
const modelFactoryService = new view.ModelFactoryService(this.host);
|
|
577
|
-
this.model = await modelFactoryService.open(context);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
async validate() {
|
|
581
|
-
if (!this.model.format || (this.format && this.format !== this.model.format)) {
|
|
582
|
-
throw new Error(`Invalid model format '${this.model.format}'.`);
|
|
583
|
-
}
|
|
584
|
-
if (this.producer && this.model.producer !== this.producer) {
|
|
585
|
-
throw new Error(`Invalid producer '${this.model.producer}'.`);
|
|
586
|
-
}
|
|
587
|
-
if (this.runtime && this.model.runtime !== this.runtime) {
|
|
588
|
-
throw new Error(`Invalid runtime '${this.model.runtime}'.`);
|
|
589
|
-
}
|
|
590
|
-
if (this.model.metadata && !Array.isArray(this.model.metadata) && this.model.metadata.every((argument) => argument.name && argument.value)) {
|
|
591
|
-
throw new Error("Invalid model metadata.'");
|
|
592
|
-
}
|
|
593
|
-
if (this.assert) {
|
|
594
|
-
for (const assert of this.assert) {
|
|
595
|
-
const parts = assert.split('==').map((item) => item.trim());
|
|
596
|
-
const properties = parts[0].split('.');
|
|
597
|
-
const value = JSON.parse(parts[1].replace(/\s*'|'\s*/g, '"'));
|
|
598
|
-
let context = { model: this.model };
|
|
599
|
-
while (properties.length) {
|
|
600
|
-
const property = properties.shift();
|
|
601
|
-
if (context[property] !== undefined) {
|
|
602
|
-
context = context[property];
|
|
603
|
-
continue;
|
|
604
|
-
}
|
|
605
|
-
const match = /(.*)\[(.*)\]/.exec(property);
|
|
606
|
-
if (match && match.length === 3 && context[match[1]] !== undefined) {
|
|
607
|
-
const array = context[match[1]];
|
|
608
|
-
const index = parseInt(match[2], 10);
|
|
609
|
-
if (array[index] !== undefined) {
|
|
610
|
-
context = array[index];
|
|
611
|
-
continue;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
throw new Error(`Invalid property path: '${parts[0]}`);
|
|
615
|
-
}
|
|
616
|
-
if (context !== value) {
|
|
617
|
-
throw new Error(`Invalid '${context}' != '${assert}'.`);
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
if (this.model.version || this.model.description || this.model.author || this.model.license) {
|
|
622
|
-
// continue
|
|
623
|
-
}
|
|
624
|
-
/* eslint-disable no-unused-expressions */
|
|
625
|
-
const validateGraph = async (graph) => {
|
|
626
|
-
const values = new Map();
|
|
627
|
-
const validateValue = async (value) => {
|
|
628
|
-
if (value === null) {
|
|
629
|
-
return;
|
|
630
|
-
}
|
|
631
|
-
value.name.toString();
|
|
632
|
-
value.name.length;
|
|
633
|
-
value.description;
|
|
634
|
-
if (value.quantization) {
|
|
635
|
-
if (!this.tags.has('quantization')) {
|
|
636
|
-
throw new Error("Invalid 'quantization' tag.");
|
|
637
|
-
}
|
|
638
|
-
const quantization = new view.Quantization(value.quantization);
|
|
639
|
-
quantization.toString();
|
|
640
|
-
}
|
|
641
|
-
if (value.type) {
|
|
642
|
-
value.type.toString();
|
|
643
|
-
}
|
|
644
|
-
if (value.initializer) {
|
|
645
|
-
value.initializer.type.toString();
|
|
646
|
-
if (value.initializer && value.initializer.peek && !value.initializer.peek()) {
|
|
647
|
-
await value.initializer.read();
|
|
648
|
-
}
|
|
649
|
-
const tensor = new base.Tensor(value.initializer);
|
|
650
|
-
if (!this.tags.has('skip-tensor-value')) {
|
|
651
|
-
if (tensor.encoding !== '<' && tensor.encoding !== '>' && tensor.encoding !== '|') {
|
|
652
|
-
throw new Error(`Tensor encoding '${tensor.encoding}' is not implemented.`);
|
|
653
|
-
}
|
|
654
|
-
if (tensor.layout && (tensor.layout !== 'sparse' && tensor.layout !== 'sparse.coo')) {
|
|
655
|
-
throw new Error(`Tensor layout '${tensor.layout}' is not implemented.`);
|
|
656
|
-
}
|
|
657
|
-
if (!tensor.empty) {
|
|
658
|
-
if (tensor.type && tensor.type.dataType === '?') {
|
|
659
|
-
throw new Error('Tensor data type is not defined.');
|
|
660
|
-
} else if (tensor.type && !tensor.type.shape) {
|
|
661
|
-
throw new Error('Tensor shape is not defined.');
|
|
662
|
-
} else {
|
|
663
|
-
tensor.toString();
|
|
664
|
-
if (this.tags.has('validation')) {
|
|
665
|
-
const size = tensor.type.shape.dimensions.reduce((a, b) => a * b, 1);
|
|
666
|
-
if (tensor.type && tensor.type.dataType !== '?' && size < 8192) {
|
|
667
|
-
let data_type = '?';
|
|
668
|
-
switch (tensor.type.dataType) {
|
|
669
|
-
case 'boolean': data_type = 'bool'; break;
|
|
670
|
-
case 'bfloat16': data_type = 'float32'; break;
|
|
671
|
-
case 'float8e5m2': data_type = 'float16'; break;
|
|
672
|
-
case 'float8e5m2fnuz': data_type = 'float16'; break;
|
|
673
|
-
case 'float8e4m3fn': data_type = 'float16'; break;
|
|
674
|
-
case 'float8e4m3fnuz': data_type = 'float16'; break;
|
|
675
|
-
case 'int4': data_type = 'int8'; break;
|
|
676
|
-
default: data_type = tensor.type.dataType; break;
|
|
677
|
-
}
|
|
678
|
-
Target.execution = Target.execution || new python.Execution();
|
|
679
|
-
const execution = Target.execution;
|
|
680
|
-
const bytes = execution.invoke('io.BytesIO', []);
|
|
681
|
-
const dtype = execution.invoke('numpy.dtype', [data_type]);
|
|
682
|
-
const array = execution.invoke('numpy.asarray', [tensor.value, dtype]);
|
|
683
|
-
execution.invoke('numpy.save', [bytes, array]);
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
} else if (value.name.length === 0) {
|
|
690
|
-
throw new Error('Empty value name.');
|
|
691
|
-
}
|
|
692
|
-
if (value.name.length > 0 && value.initializer === null) {
|
|
693
|
-
if (!values.has(value.name)) {
|
|
694
|
-
values.set(value.name, value);
|
|
695
|
-
} else if (value !== values.get(value.name)) {
|
|
696
|
-
throw new Error(`Duplicate value '${value.name}'.`);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
};
|
|
700
|
-
const signatures = Array.isArray(graph.signatures) ? graph.signatures : [graph];
|
|
701
|
-
for (const signature of signatures) {
|
|
702
|
-
for (const input of signature.inputs) {
|
|
703
|
-
input.name.toString();
|
|
704
|
-
input.name.length;
|
|
705
|
-
for (const value of input.value) {
|
|
706
|
-
/* eslint-disable no-await-in-loop */
|
|
707
|
-
await validateValue(value);
|
|
708
|
-
/* eslint-enable no-await-in-loop */
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
for (const output of signature.outputs) {
|
|
712
|
-
output.name.toString();
|
|
713
|
-
output.name.length;
|
|
714
|
-
for (const value of output.value) {
|
|
715
|
-
/* eslint-disable no-await-in-loop */
|
|
716
|
-
await validateValue(value);
|
|
717
|
-
/* eslint-enable no-await-in-loop */
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
if (graph.metadata && !Array.isArray(graph.metadata) && graph.metadata.every((argument) => argument.name && argument.value)) {
|
|
722
|
-
throw new Error("Invalid graph metadata.'");
|
|
723
|
-
}
|
|
724
|
-
for (const node of graph.nodes) {
|
|
725
|
-
const type = node.type;
|
|
726
|
-
if (!type || typeof type.name !== 'string') {
|
|
727
|
-
throw new Error(`Invalid node type '${JSON.stringify(node.type)}'.`);
|
|
728
|
-
}
|
|
729
|
-
if (Array.isArray(type.nodes)) {
|
|
730
|
-
/* eslint-disable no-await-in-loop */
|
|
731
|
-
await validateGraph(type);
|
|
732
|
-
/* eslint-enable no-await-in-loop */
|
|
733
|
-
}
|
|
734
|
-
view.Documentation.open(type);
|
|
735
|
-
node.name.toString();
|
|
736
|
-
node.description;
|
|
737
|
-
if (node.metadata && !Array.isArray(node.metadata) && node.metadata.every((argument) => argument.name && argument.value)) {
|
|
738
|
-
throw new Error("Invalid graph metadata.'");
|
|
739
|
-
}
|
|
740
|
-
const attributes = node.attributes;
|
|
741
|
-
if (attributes) {
|
|
742
|
-
for (const attribute of attributes) {
|
|
743
|
-
attribute.name.toString();
|
|
744
|
-
attribute.name.length;
|
|
745
|
-
const type = attribute.type;
|
|
746
|
-
const value = attribute.value;
|
|
747
|
-
if ((type === 'graph' || type === 'function') && value && Array.isArray(value.nodes)) {
|
|
748
|
-
/* eslint-disable no-await-in-loop */
|
|
749
|
-
await validateGraph(value);
|
|
750
|
-
/* eslint-enable no-await-in-loop */
|
|
751
|
-
} else {
|
|
752
|
-
let text = new view.Formatter(attribute.value, attribute.type).toString();
|
|
753
|
-
if (text && text.length > 1000) {
|
|
754
|
-
text = `${text.substring(0, 1000)}...`;
|
|
755
|
-
}
|
|
756
|
-
/* value = */ text.split('<');
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
const inputs = node.inputs;
|
|
761
|
-
if (Array.isArray(inputs)) {
|
|
762
|
-
for (const input of inputs) {
|
|
763
|
-
input.name.toString();
|
|
764
|
-
input.name.length;
|
|
765
|
-
if (!input.type || input.type.endsWith('*')) {
|
|
766
|
-
for (const value of input.value) {
|
|
767
|
-
/* eslint-disable no-await-in-loop */
|
|
768
|
-
await validateValue(value);
|
|
769
|
-
/* eslint-enable no-await-in-loop */
|
|
770
|
-
}
|
|
771
|
-
if (this.tags.has('validation')) {
|
|
772
|
-
if (input.value.length === 1 && input.value[0].initializer) {
|
|
773
|
-
const sidebar = new view.TensorSidebar(this.view, input);
|
|
774
|
-
sidebar.render();
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
const outputs = node.outputs;
|
|
781
|
-
if (Array.isArray(outputs)) {
|
|
782
|
-
for (const output of node.outputs) {
|
|
783
|
-
output.name.toString();
|
|
784
|
-
output.name.length;
|
|
785
|
-
if (!output.type || output.type.endsWith('*')) {
|
|
786
|
-
for (const value of output.value) {
|
|
787
|
-
/* eslint-disable no-await-in-loop */
|
|
788
|
-
await validateValue(value);
|
|
789
|
-
/* eslint-enable no-await-in-loop */
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
if (node.chain) {
|
|
795
|
-
for (const chain of node.chain) {
|
|
796
|
-
chain.name.toString();
|
|
797
|
-
chain.name.length;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
const sidebar = new view.NodeSidebar(this.view, node);
|
|
801
|
-
sidebar.render();
|
|
802
|
-
}
|
|
803
|
-
const sidebar = new view.ModelSidebar(this.view, this.model, graph);
|
|
804
|
-
sidebar.render();
|
|
805
|
-
};
|
|
806
|
-
/* eslint-enable no-unused-expressions */
|
|
807
|
-
for (const graph of this.model.graphs) {
|
|
808
|
-
/* eslint-disable no-await-in-loop */
|
|
809
|
-
await validateGraph(graph);
|
|
810
|
-
/* eslint-enable no-await-in-loop */
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
async render() {
|
|
815
|
-
for (const graph of this.model.graphs) {
|
|
816
|
-
const signatures = Array.isArray(graph.signatures) && graph.signatures.length > 0 ? graph.signatures : [graph];
|
|
817
|
-
for (const signature of signatures) {
|
|
818
|
-
/* eslint-disable no-await-in-loop */
|
|
819
|
-
await this.view.renderGraph(this.model, graph, signature, this.view.options);
|
|
820
|
-
/* eslint-enable no-await-in-loop */
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
if (!worker_threads.isMainThread) {
|
|
827
|
-
worker_threads.parentPort.addEventListener('message', async (e) => {
|
|
828
|
-
const message = e.data;
|
|
829
|
-
const response = {};
|
|
830
|
-
try {
|
|
831
|
-
const target = new Target(message);
|
|
832
|
-
response.type = 'complete';
|
|
833
|
-
response.target = target.name;
|
|
834
|
-
target.on('status', (_, message) => {
|
|
835
|
-
message = { type: 'status', ...message };
|
|
836
|
-
worker_threads.parentPort.postMessage(message);
|
|
837
|
-
});
|
|
838
|
-
if (message.measures) {
|
|
839
|
-
target.measures = new Map();
|
|
840
|
-
}
|
|
841
|
-
await target.execute();
|
|
842
|
-
response.measures = target.measures;
|
|
843
|
-
} catch (error) {
|
|
844
|
-
response.type = 'error';
|
|
845
|
-
response.error = {
|
|
846
|
-
name: error.name,
|
|
847
|
-
message: error.message
|
|
848
|
-
};
|
|
849
|
-
const cause = error.cause;
|
|
850
|
-
if (cause) {
|
|
851
|
-
response.error.cause = {
|
|
852
|
-
name: cause.name,
|
|
853
|
-
message: cause.message
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
worker_threads.parentPort.postMessage(response);
|
|
858
|
-
});
|
|
859
|
-
}
|