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.17.0 .

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

$ docker build tag wearablepermed-predictor:1.17.0 simuruo/wearablepermed-predictor:1.17.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.17.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.17.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.17.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.17.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.17.0"
    

    Windows `run_predictor.bat script:

    :: --- SYSTEM CONFIGURATION ---
    set PREDICTOR_VERSION=1.17.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.17.0 .
    $ docker tag wearablepermed-predictor:1.17.0 simuruo/wearablepermed-predictor:1.17.0
    $ docker push simuruo/wearablepermed-predictor:1.17.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.18.0.tar.gz (30.1 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.18.0.tar.gz.

File metadata

File hashes

Hashes for uniovi_simur_wearablepermed_predictor-1.18.0.tar.gz
Algorithm Hash digest
SHA256 4de82a1573dbaae0574e0b86e0e555894fa331405db56e3f8ab78e7a7b584252
MD5 df9207ae853fdc30e9ea8071d3a51d45
BLAKE2b-256 90da79ce9cf739392162833e600b0f52d4537fbbed571c5988e9cf5178593401

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uniovi_simur_wearablepermed_predictor-1.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e9ad0584e5db38457411960a3d3e6995d45782fa7b692b2e4fa6b0527cb0671
MD5 5eaf38701aa9d1ab1f3ba8273237817a
BLAKE2b-256 7467e71d734dd89927e8a1c1ed2e00af75d7c5f09f8256a5ead88815eb5d51ca

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