Hydra Profiler
This package provides an extremely simple utility that can be used via the Hydra configuration system's experimental callbacks system to automatically profile the memory usage and runtime of your Hydra-launched python jobs.
Installation
pip install hydra-profiler
Usage
When running any hydra job, just add the following to your command line:
$COMMAND... ++hydra.callbacks.profiler._target_=hydra_profiler.profiler.ProfilerCallback
Once your job is complete, a memray memory profile will be saved to the
hydra's run directory under the filepath ${hydra.run.dir}/${job_name}.memray. Additionally, a timing.json
file will be written that contains the overall job's runtime. No extensive time profiling (e.g., with
cProfile) is included at this time.
You can also add this to your hydra configuration file directly:
hydra:
callbacks:
profiler:
_target_: hydra_profiler.profiler.ProfilerCallback
You can then use the output files via any memray tool (on the memory
side) and just by inspecting the timing.json file for the runtime.
Future Work
- Add more detailed timing information.
- More carefully assess the overhead of the profiler.
- Ensure there are no memory leaks or issues should the job terminate unexpectedly.
- Ensure this works on sweeper and multi-run jobs.
Metadata
Release files for hydra-profiler 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 | |
|---|---|---|---|---|
| hydra_profiler-0.0.1.tar.gz | 7.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hydra_profiler-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / hydra_profiler-0.0.1.tar.gz
| Download URL | hydra_profiler-0.0.1.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27f41f247c07d37fc5341fc784019f8f966b808c0963fb761bf29f43f2ce6f34
|
|
BLAKE2b-256 checksum How to use checksums |
de325e1a870f19ce988be90dc3ad531d00f94e2a38eef8567a349a2278d5abec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / hydra_profiler-0.0.1-py3-none-any.whl
| Download URL | hydra_profiler-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33b7c8022fd0ede88218a45263004e991975179c13ebddcce29ef7e27e83be58
|
|
BLAKE2b-256 checksum How to use checksums |
5c365e9ff3f266ee06e4fd8faa358d91e5d38e08b3b1b17190101853b51254d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for hydra-profiler 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.