Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Create TensorIO model bundles
NOTE: Working on making a PyPI package. Once that is done, these instructions will change
to use whatever binary the corresponding pip install
produces.
The tensorio_bundler
module comes with a bundler
utility that you can use to create TensorIO
zipped tiobundle files directly from your command line.
For more information on how to run the bundler
, run:
python -m tensorio_bundler.bundler -h
A sample invocation (using test data, assumed to be run from project root -- same directory as this README):
python -m tensorio_bundler.bundler \
--tflite-model ./tensorio_bundler/fixtures/test.tflite \
--model-json ./tensorio_bundler/fixtures/test.tiobundle/model.json \
--assets-dir ./tensorio_bundler/fixtures/test.tiobundle/assets \
--bundle-name sample.tiobundle \
--outfile sample.tiobundle.zip
To run the REST API locally from project root (same directory as this README):
gunicorn tensorio_bundler.rest:api
In a separate terminal window, you can invoke the bundler as follows:
TFLITE_PATH="\"$(mktemp -d)/model.tflite\""
read -r -d '' REQUEST_BODY <<-EOF
{
"saved_model_dir": "./tensorio_bundler/fixtures/test-model",
"build": true,
"tflite_path": $TFLITE_PATH,
"model_json_path": "./tensorio_bundler/fixtures/test.tiobundle/model.json",
"assets_path": "./tensorio_bundler/fixtures/test.tiobundle/assets",
"bundle_name": "curl-test.tiobundle",
"bundle_output_path": "curl-test.tiobundle.zip"
}
EOF
curl -v -X POST \
-H "Content-Type: application/json" \
-d "$REQUEST_BODY" \
http://localhost:8000/bundle
If you don't have it, get it
You can either bind mount the paths to the inputs into your docker container when you run the
bundler or you can bind mount in a service account credentials file and set the
GOOGLE_APPLICATION_CREDENTIALS
environment variable to point at the mount path in the container.
NOTE: These instructions are extremely sparse at the moment. They will not be so forever.
The TensorIO bundler is now integrated with tensorio-models
via the Repository REST API. Once a bundle has been built, you can use the
tensorio_bundler.bundler.register_bundle
method to register it against a TensorIO Models
repository. The tensorio_bundler.bundler
CLI allows you to do this automatically through the
--repository-path
argument.
This requires two environment variables to be set in your environment:
REPOSITORY
-- a URL for a TensorIO models repository API URL (e.g. https://tio-models-test.dev.docai.beer/rest/v1/repository)
REPISITORY_API_KEY
-- a basic auth token used to authenticate requests against the repository
REST API.
If you don't have it, get it
Simply run:
./test.sh
FAQs
Bundle models for use with TensorIO
We found that tensorio-bundler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.