Samsung / CredSweeper

CredSweeper is a tool to detect credentials in any directories or files. CredSweeper could help users to detect unwanted exposure of credentials (such as token, passwords, api keys etc.) in advance. By scanning lines, filtering, and using AI model as option, CredSweeper reports lines with possible credentials, where the line is, and expected type o

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proposal: migrate from TF to ONNX

meanrin opened this issue · comments

Propose to migrate model from TF to ONNX ML libraries

https://onnx.ai/ - "ONNX is an open format built to represent machine learning models."
This lib allows to run ml models on a different platforms, but not training them

Motivation:

Migration from TF to ONNX usually require simple model conversion process: https://onnxruntime.ai/docs/tutorials/tf-get-started.html#converting-a-model

Other than that we would need to update code that directly utilize tensorflow functions


CredSweeper exec time with tf imports:

$ time python -m credsweeper --ml_validation --path tests/samples/password -j 1

real    0m4,487s
user    0m4,182s
sys     0m2,635s

And without them (--ml_validation also removed due to it currently depends ion tf):

$ time python -m credsweeper --path tests/samples/password -j 1

real    0m0,440s
user    0m0,400s
sys     0m0,045s

Example import time for tf and onnx:

$ time python -c "import tensorflow"

real    0m1,198s
user    0m1,464s
sys     0m1,814s
$ time python -c "import onnx"

real    0m0,098s
user    0m0,219s
sys     0m0,707s