HERMES - PyTorch
Support package to inject PyTorch AI models in the sensing-processing closed-loop of HERMES.
- Classifier model wrapper, via
TorchClassifierPipeline. - Regression model wrapper.
- ...
Installation
Nodes available under the same HERMES namespace of hermes.torch, such as TorchClassifierPipeline.
From PyPI
pip install pysio-hermes-torch
From source
git clone https://github.com/maximyudayev/hermes-torch.git
pip install -e hermes-torch
Usage
Using PyTorch AI models follows the standard configuration file specification process of HERMES nodes.
- Prepare your PyTorch model in a regular workflow - design, train, and export a
.pthcheckpoint. - Provide the path in the HERMES config file to both, the checkpoint file and the module containing the
nn.Modulearchitecture. - Specify the input modalities the AI model should receive for its computations under
stream_in_specs. - Override
forwardand (optionally)load_state_dictmethods on your customnn.Moduleclass, where needed. Realtime TCN example implementation for the freezing-of-gait proof-of-concept uses internal logic for non-torch filtering and normalization, and contains non-torch object parameters: it required a method override for successful loading of the model's state dictionary from a trained checkpoint file.
(Optional) Dedicated Node
You can optionally inherit from TorchClassifierPipeline, or Pipeline directly, to create a dedicated (hardcoded) Node for the target AI algorithm, similar to the HERMES extension process with support for new sensors (e.g. a TorchRegressionPipeline, TorchEmbeddingPipeline, etc., some of which are on the current development roadmap).
This will simplify the YAML file structure, especially for big models.
In that case, make sure to override the required abstract methods to enable auto-discovery and connection of the custom node to the rest of HERMES.
Citation
When using any parts of this repository outside of its intended use, please cite the parent project HERMES.
Metadata
Release files for pysio-hermes-torch 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysio_hermes_torch-0.0.1.tar.gz | 9.9 kB | Without provenance | Details for pysio_hermes_torch-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysio_hermes_torch-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for pysio_hermes_torch-0.0.1-py3-none-any.whl |
Total release size: 21.6 kB
Release files / pysio_hermes_torch-0.0.1.tar.gz
| Download URL | pysio_hermes_torch-0.0.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4dbe9a6c07ef362d574b270fbbebc28298b3ae9791f22d7f8396ebb3ce2c60bb
|
|
BLAKE2b-256 checksum How to use checksums |
c22caf8919c2ce9c7ed422e239b981978ec11a0ecd44b54393aeee9b77e78c88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / pysio_hermes_torch-0.0.1-py3-none-any.whl
| Download URL | pysio_hermes_torch-0.0.1-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efa9d188d40ecfbe84ef9d9c09674bc02351cab20722c3fe49d980fc59e6437e
|
|
BLAKE2b-256 checksum How to use checksums |
db53f78900ea0cc0d143df6a94be9311816e3bc01b861b611106add28127eeac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for pysio-hermes-torch 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.