Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
merlin-batch-predictor
Advanced tools
Merlin Batch Predictor is a PySpark application for running batch prediction job in Merlin system.
The application accept a yaml file for configuring source, model, and sink of the prediction job. The schema of the configuration file is described by the proto file. An example of the config file is as follow.
kind: PredictionJob
version: v1
name: integration-test
bigquerySource:
table: "project.dataset.table_iris"
features:
- sepal_length
- sepal_width
- petal_length
- petal_width
model:
type: PYFUNC_V2
uri: gs://bucket-name/e2e/artifacts/model
result:
type: DOUBLE
bigquerySink:
table: "project.dataset.table_iris_result"
result_column: "prediction"
save_mode: OVERWRITE
options:
project: "project"
temporaryGcsBucket: "bucket-name"
The above prediction job specification will read data from bigquery-public-data:samples.shakespeare
Bigquery table,
run prediction using a PYFUNC_V2
model located at gs://bucket-name/mlflow/6/2c3703fbbf9f4866b26e4cf91641f02c/artifacts/model
GCS bucket,
and write the result to another bigquery table project.dataset.table
.
To start the application locally you need:
GOOGLE_APPLICATION_CREDENTIALS
environment variable and point it to the service account which has following privileges:
temporaryGcsBucket
temporaryGcsBucket
Then you can invoke
python main.py --job-name <job-name> --spec-path <path-to-spec-yaml> --local
In mac OS you need to set OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES python main.py --job-name <job-name> --spec-path <path-to-spec-yaml> --local
For example
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES python main.py --job-name iris-prediction --spec-path sample/sample_1.yaml --local
pip install pipenv
)make setup
You need to set GOOGLE_APPLICATION_CREDENTIALS
and point it to service account file which has following privileges:
make test
Run only unit test
make unit-test
FAQs
Base PySpark application for running Merlin prediction batch job
We found that merlin-batch-predictor 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.