Skip to main content

Uniovi Simur WearablePerMed Predictor.

Project description

Project generated with PyScaffold

Description

Uniovi Simur WearablePerMed Predictor.

Build and publish docker image

You must install docker previous to use these commands

To build the image execute this command:

$ docker build -t wearablepermed-predictor:1.18.0 .

To tag the image to be published in simuruo docker hub account execute this command:

$ docker build tag wearablepermed-predictor:1.18.0 simuruo/wearablepermed-predictor:1.18.0 

Login in simuruo docker hub account execute this command:

$ docker login -u simuruo
Password: 

To publish image in simuruo docker hub account execute this command:

$ docker push simuruo/wearablepermed-predictor:1.18.0

Execute from Python package

$ predictor \
--models-folder /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/models \
--model-id MODEL_PI_RF_ACC_GYR_4 \
--resources-folder /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/input \
--resource-id case_PI_BRF_acc_gyr_01/PMP1024_W1_PI_1.csv \
--cases-folder /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/output \
--case-id case_PI_BRF_acc_gyr_4_classes_01 \
--case-file-format csv \
--verbose

Execute from docker image

$ docker run \
--rm \
-u $(id -u):$(id -g) \
-v /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/input:/home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/input \
-v /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/output:/home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/output \
simuruo/wearablepermed-predictor:1.18.0 \
--model-id MODEL_PI_RF_ACC_GYR_4 \
--resources-folder /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/input \
--resource-id case_PI_BRF_acc_gyr_01/PMP1024_W1_PI_1.csv \
--cases-folder /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/output \
--case-id case_PI_BRF_acc_gyr_4_classes_01 \
--verbose

Predictor arguments

These arguments are used if you select Python Package or Docker containers to execute predictor command:

  • models-folder (*): The root models folder.

  • model-id (*): The model id to be load. Possible values are: [MODEL_PI_RF_ACC_GYR_15, MODEL_M_RF_ACC_GYR_15, MODEL_C_RF_ACC_GYR_15, MODEL_PI_RF_ACC_GYR_4, MODEL_M_RF_ACC_GYR_4, MODEL_C_RF_ACC_GYR_4. Example: MODEL_PI_RF_ACC_GYR_15].

  • resources-folder (*): The root resourcers folder.

  • resource-id (*): The resource file id in csv format.

  • cases-folder: The root cases folder.

  • case-id: Case unique name where save results under cases-folder.

  • case-file-format: Case file format. Default is npz. Possible values: [npz, csv].

  • is-label-export: Specify if predictions are export as label format. Default is False.

  • is-database-export: The prediction result is database saved. Default is False.

  • verbose: activate verbose logging mode.

(*) are mandatory arguments

If you want login inside the container execute this command.

$ docker run \
--rm \
-it \
-u $(id -u):$(id -g) \
-v /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/input:/home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/input \
-v /home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/output:/home/miguel/git/uniovi/simur/uniovi-simur-wearablepermed-predictor/data/output \
--entrypoint sh \
simuruo/wearablepermed-predictor:1.18.0

Default Value

All models offered by predictor are trained with

  • Window size of 250 and overlapping of 50%.
  • Right now only individual models are offered by predc¡ictor: Wrist, Thigh or Hip segment bodies.

Build and Publish in Pypi and Docker Hub

  1. Set the final version to the precitor python package from file setup.cfg

    version = 1.18.0
    
  2. Set the new version in the shell scripts: run_predictor.sh, run_predictor.bat

    Linux/Mac run_predictor.sh script:

    # --- CONFIGURATION (Change these) ---
    PREDICTOR_VERSION="1.18.0"
    

    Windows `run_predictor.bat script:

    :: --- SYSTEM CONFIGURATION ---
    set PREDICTOR_VERSION=1.18.0
    
  3. Rebuild and publish package in Pypi repository (You must have credentials)

    $ tox -e clean
    $ tox -e build
    $ tox -e publish -- --repository pypi
    
  4. Finally build docker image with the last version selected and publish in simuruo Docker Hub account (You must have credentials)

    $ docker build -t wearablepermed-predictor:1.18.0 .
    $ docker tag wearablepermed-predictor:1.18.0 simuruo/wearablepermed-predictor:1.18.0
    $ docker push simuruo/wearablepermed-predictor:1.18.0
    

Note

This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uniovi_simur_wearablepermed_predictor-1.20.0.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file uniovi_simur_wearablepermed_predictor-1.20.0.tar.gz.

File metadata

File hashes

Hashes for uniovi_simur_wearablepermed_predictor-1.20.0.tar.gz
Algorithm Hash digest
SHA256 de6a3c5b0d0869c18048a02f522b51b8cd19762d086d69184af495412f06034f
MD5 3d2c43cce019ba6fc5ef887223966f84
BLAKE2b-256 a568c9aaf166ea4634544826e0f0e7f31af5484ce838c037872c8054e6bdc04f

See more details on using hashes here.

File details

Details for the file uniovi_simur_wearablepermed_predictor-1.20.0-py3-none-any.whl.

File metadata

File hashes

Hashes for uniovi_simur_wearablepermed_predictor-1.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ac867542c91eee08d0b148ff6d13234c9d7864973a99cf1eebcfbeaf5ed1df7
MD5 bd04108bc68075c00a484082824beee6
BLAKE2b-256 aab6b25fd361434b81cab5bfef81b288ca3dff0474f7e69526f3e2186f2b6dac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page