Histogramming as a Service
Project description
Histogramming as a Service (HistServ)
Install
pip install histserv
Example
See example/.
Start gRPC server (or just ./example/start_server.sh):
histserv --port 50051 --n-threads 4
# INFO:histserv:Histogram server started, listening on [::]:50051 with 4 threads
Run example client:
python example/client.py
# Remote hist initialized: RemoteHist<ID=52c77c93da8146f2a72c53af269d1ab5 @[::]:50051>
# Remote hist filled successfully? -> True
# Snapshotting current hist: Hist(
# Regular(10, -2, 2, name='x', label='X Axis'),
# Regular(10, -2, 2, name='y', label='Y Axis'),
# StrCategory(['data', 'drell-yan'], growth=True, name='dataset', label='Dataset'),
# storage=Weight()) # Sum: WeightedSum(value=911503, variance=911503) (WeightedSum(value=1e+06, variance=1e+06) with flow)
# Remote hist filled successfully? -> True
# Remote hist filled successfully? -> True
# Remote hist flushed succesfully? -> Histogram (52c77c93da8146f2a72c53af269d1ab5) flushed successfully to hist.h5.
And the server logs additionally (after running the client script):
# INFO:histserv:Initialized histogram (52c77c93da8146f2a72c53af269d1ab5)
# INFO:histserv:Filled histogram (52c77c93da8146f2a72c53af269d1ab5) with 24,000,000 bytes
# INFO:histserv:Created snapshot of histogram (52c77c93da8146f2a72c53af269d1ab5)
# INFO:histserv:Filled histogram (52c77c93da8146f2a72c53af269d1ab5) with 24,000,000 bytes
# INFO:histserv:Filled histogram (52c77c93da8146f2a72c53af269d1ab5) with 24,000,000 bytes
# INFO:histserv:Flushed histogram (52c77c93da8146f2a72c53af269d1ab5) to hist.h5
Or check out how to use remote histogram filling with an example coffea Processor in example/coffea_processor.py.
Current supported types
Axis support:
hist.axis.Regularhist.axis.Booleanhist.axis.Variablehist.axis.Integerhist.axis.IntCategoryhist.axis.StrCategory
np.dtype support for hist.axis.{Regular,Variable,Integer}:
np.float64np.float32np.int64np.int32
Developer Info
Install
uv pip install -e . --group=dev
protobuf codegen
python -m grpc_tools.protoc -Isrc/histserv/protos --python_out=src/histserv/protos --pyi_out=src/histserv/protos --grpc_python_out=src/histserv/protos src/histserv/protos/hist.proto
Maybe adjust imports in src/histserv/protos/hist_pb2_grpc.py.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file histserv-0.1.2.tar.gz.
File metadata
- Download URL: histserv-0.1.2.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f284ebb0f7e38b848417df5d96ddf92698ea9921db81b107cba18ca674eab35
|
|
| MD5 |
a386a65b39a516cbd57596cadd631e4e
|
|
| BLAKE2b-256 |
cddbeaca3acac44b64a0aabff9c2fea7e18325c2a8ee9e86618c4b9f52731128
|
Provenance
The following attestation bundles were made for histserv-0.1.2.tar.gz:
Publisher:
cd.yml on pfackeldey/histserv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
histserv-0.1.2.tar.gz -
Subject digest:
2f284ebb0f7e38b848417df5d96ddf92698ea9921db81b107cba18ca674eab35 - Sigstore transparency entry: 1135105543
- Sigstore integration time:
-
Permalink:
pfackeldey/histserv@7400920cd2842d34bb9067f31ec7b127b7edf6fb -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@7400920cd2842d34bb9067f31ec7b127b7edf6fb -
Trigger Event:
release
-
Statement type:
File details
Details for the file histserv-0.1.2-py3-none-any.whl.
File metadata
- Download URL: histserv-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e72274818839b0d4cc7b06355050379c41d86867b420a90e4028d2563ff812ed
|
|
| MD5 |
223169bbdd4100be992b8fbdcdf7d597
|
|
| BLAKE2b-256 |
4ee33b38135b0699c31100e27305c6bf74397e9370a845551c07855e75e89ab8
|
Provenance
The following attestation bundles were made for histserv-0.1.2-py3-none-any.whl:
Publisher:
cd.yml on pfackeldey/histserv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
histserv-0.1.2-py3-none-any.whl -
Subject digest:
e72274818839b0d4cc7b06355050379c41d86867b420a90e4028d2563ff812ed - Sigstore transparency entry: 1135105587
- Sigstore integration time:
-
Permalink:
pfackeldey/histserv@7400920cd2842d34bb9067f31ec7b127b7edf6fb -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pfackeldey
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@7400920cd2842d34bb9067f31ec7b127b7edf6fb -
Trigger Event:
release
-
Statement type: