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.
easierai-trainer-library
Advanced tools
Project hosting the trainer for generic estimation models.
Regarding the way to accurately estimate next possible values based on the context information, the trainer makes use of the Python-based framework Keras that operates on top of TensorFlow Google's Deep Learning framework.
The trainer is defined as a microservice so that it is easy to be run and deployed in any use case and infrastructure. In addition, it is fully configurable and adaptable for scenario.
With the data produced by the sensors every day, a database is collected for every entity/id so that a predictive model can be produced for each entity. This model will recognize and detect the patterns in the data so that it is able to forecast (predict), considering some context input data, the next value(s) of the time series; or to estimate the value of a specific target feature.
In order to train the model, an Elasticsearch database is used to obtain the data. Models are stored in MINIO so that they can be loaded from other microservices.
There are several parameters that can be modified to change how the system learns. These parameters are enclosed in the file ./config/config_trainer_estimation.ini.sample
, and are explained here:
INFERENCE section:
timeseries
or features
and stands for the type of the data to train the model. If the datatype is features
, the next two parameters are ignored.timeseries
.ML_INITIAL section:
ML section:
The format for time_window parameters follows Date Math from elasticsearch API.
ELASTIC section:
DATA section:
timestamp
ELK section
9200
(default of elasticsearch)MINIO section
9000
)Use this command to launch the container:
docker run -e ELASTIC_HOST=[$ELASTIC_HOST] -e ELASTIC_PORT=[$ELASTIC_PORT] -e MINIO_ACCESS_KEY=[$MINIO_ACCESS_KEY] -e MINIO_SECRET_KEY=[$MINIO_SECRET_KEY] -e MINIO_SERVICE_HOST=[$MINIO_HOST] -e MINIO_SERVICE_PORT=[$MINIO_PORT] -e TRAINING_RESULTS_ID=[$TRAINING_RESULTS_ID] -e INPUT_FEATURES=[$INPUT_FEATURES] -e PREDICTION_FEATURES=[$PREDICTION_FEATURES] -v ./config/:/usr/app/src/config --name trainer easierai/trainer:1.0
Apart from the basic environment variables, you can perform a more advanced configuration by overriding the configuration file inside the trainer (./config/config.ini to the docker file: /usr/app/src/config/config.ini
) by passing a volume to the docker image (notice that the volume is a folder named config in which there is a file named config.ini
) adding the tag -v
to the docker command.
Notice:
Variables MINIO_ACCESS_KEY
and MINIO_SECRET_KEY
are, respectively, the username and password of the MINIO service deployed, check the configuration of this service to know more.
Appart from those variable, you must specify at least @tag (for example 1.1) and the folder that contains the configuration file as a volume. Make sure that inside the folder ./config
there should be a file called config.ini
with the configuration file previously explained.
In addition, you should specify the environment variables for the elasticsearch host, the elasticsearch port and minio host and port. If you do not provide them, the ones in the config.ini file will be used. You should also open the port used as REST API and make sure you use a different port than the inferencer if you plan to launch both on the same machine. As you can see, there are a few more variables you need to configure:
ELASTIC_HOST: elasticsearch host IP or hostname.
ELASTIC_PORT: elasticsearch port.
MINIO_SERVICE_HOST: MINIO host IP or hostname.
MINIO_SERVICE_PORT: MINIO port.
MINIO_ACCESS: MINIO access key (username for the MINIO repository)
MINIO_SECRET: MINIO secret key (password for the MINIO repository)
You can also add this piece of code in your docker-compose file:
trainer:
image: easierai/trainer:1.0
container_name: trainer
environment:
NODE_ENV: development
ELASTIC_HOST: 127.0.0.1
ELASTIC_PORT: 9200
MINIO_SERVICE_HOST: 127.0.0.1
MINIO_SERVICE_PORT:9000
MINIO_ACCESS: username
MINIO_SECRET: password
TRAINING_RESULTS_ID: experiment-001
INPUT_FEATURES: ratio,free
INFERENCE_FEATURES: ratio
FAQs
This library contains AI code for training purposes.
We found that easierai-trainer-library 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.