Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

GitHub address Doxygen on Pages

Lamarr logo

SQLamarr

The stand-alone ultra-fast simulation option for the LHCb experiment.

The detailed simulation of the hadron collisions at the LHC, and of the interaction of the generated particles with the detector material dominates the cost for the computing infrastructure pledged to the LHCb Collaboration.

Among the various options explored towards a faster simulation, there is Lamarr, a framework defining a pipeline of parametrizations transforming generator-level quantities to reconstructed, analysis-level features. Most of the parametrizations are defined using machine-learning, and in particular Deep Neural Networks and Gradient Boosted Decision Trees, with a training procedure defined in independent packages (e.g. landerlini/lb-trksim-train and mbarbetti/lb-pidsim-train).

To be integrated in the LHCb software stack, models must be queried from a C++ application, running in the Gaudi framework, which includes a dedicated multithreading scheduler which was found to conflict with the schedulers of TensorFlow and ONNX runtimes. In addition, since the models are relatively simple and fast to evaluate, the overhead of context switching from Gaudi to a dedicated runtime was observed to be unaccptably large. Hence, models are converted into compatible C code using the landerlini/scikinC package and distributed through the CernVM FileSystem releasing the LamarrData package.

While crucial to the applications within LHCb, the integration with Gaudi and Gauss makes the adoption of Lamarr unappealing for researchers outside of the LHCb community approaching the LHCb simulation to evaluate the experiment sensitivity to new physics phenomena or studying the recently-released LHCb Open Data. The landerlini/SQLamarr package aims at decoupling Lamarr from Gaudi providing a stand-alone application with minimal dependencies that can be easily set up and run in any Linux machine. The parametrizations are shared between the Gauss-embedded implementation LbLamarr and SQLamarr. In the future, the exact same package might be integrated within Gaudi to reduce the maintainance effort.

To replace the ROOT-based TransientEventStore concept defind in Gaudi, SQLamarr adopts the SQLite3 package, enabling vectorized processing of batches of events, for a better performance.

To avoid dependencies on ROOT, also the persistency is handled using SQLite3, writing the reconstructed (or intermediate) quantities in the form of SQLite3 databases. Note that converting an SQLite3 table to a ROOT nTuple requires no more than 3 lines of Python:

import sqlite3, uproot, pandas
with sqlite3.connect("SomeInput.db") as conn:
  uproot.open("SomeFile.root", "RECREATE")["myTree"] = pandas.read_sql_table("myTable", conn)

Dependencies

  • SQLite3 with C/C++ headers
  • HepMC3 as a standard interface to event generators.

Build from source

Make sure you have conda (or similar) installed, if not get miniconda3. Create and activate a dedicated conda environment, say sqlamarr:

conda create -y -n sqlamarr -c conda-forge python=3.10 gxx gxx_linux-64 hepmc3 doxygen
conda activate sqlamarr

Create a out-of-source directory:

mkdir build
cd build

Configure and build

cmake .. 
cmake --build .

How to use SQLamarr

The project is not mature enough to provide a good user experience. For the time being, clone the repository and compile the package with CMake, then edit the file src/main.cpp to define the desired pipeline, by using the building blocks provided by the package.

BlockLib

The namespace SQLamarr::BlockLib groups functions defining specialized blocks making assumptions on the workflow in which these blocks will be deployed. While useful for testing and for organizing the code defining pipelines, it is not supposed to be stable (as it is being modified while the workflow under test is modified) and should not be used as part of other packages.

Other packages, however, may take inspiration from the structure of SQLamarr::BlockLib to design specialized blocks, resident in their codebase, in a more organized way than having everything pipelined in a single file.

To test the completeness of the feature set in the main part of the library, SQLamarr::BlockLib is designed to only include functions, accessing public methods of the objects defined in the main part of the library.

Copyright and Licence

(c) Copyright 2022 CERN for the benefit of the LHCb Collaboration.

This software is distributed under the terms of the GNU General Public Licence version 3 (GPL Version 3), copied verbatim in the file "LICENCE".

In applying this licence, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.

We acknowledge the support of the ICSC Foundation to the development of SQLamarr.

image

Metadata

Release files for SQLamarr 0.0rc7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for SQLamarr 0.0rc7
File
SQLamarr-0.0rc7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
SQLamarr-0.0rc7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
SQLamarr-0.0rc7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
SQLamarr-0.0rc7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
SQLamarr-0.0rc7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
SQLamarr-0.0rc7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 13.4 MB

Release files / SQLamarr-0.0rc7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL SQLamarr-0.0rc7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
36599a069b638734d9829cb71452496e34589fc9abacdd56f3bcf8366492f3c9
BLAKE2b-256 checksum
How to use checksums
8d63bec5f510766534f329ee1634d7cf17a1e8deb4e6fa0f1cedc71c415045f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.6

Release files / SQLamarr-0.0rc7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL SQLamarr-0.0rc7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3188234dbf4df4751af0a5a1a8c56b1de957d3e35800c4d63bc8fa39aabe40b6
BLAKE2b-256 checksum
How to use checksums
a3b83be8beaa50d90e040384262cbd83272047e34aafdc1d64bd729399c98a10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.6

Release files / SQLamarr-0.0rc7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL SQLamarr-0.0rc7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
821d66d94fab464898bf37b739439911d24bfd67870c052524309edbf4e8f81c
BLAKE2b-256 checksum
How to use checksums
5a6c3cfa6cc65a4a691d2acf288725ba5d8e7cf32ae080d097701e4b6f92231e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.6

Release files / SQLamarr-0.0rc7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL SQLamarr-0.0rc7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8e899a67943ca58ed2f574157ec3d6312017be34ca440c7b36ab5e9fc4afe463
BLAKE2b-256 checksum
How to use checksums
557b3e2f0ca08f2836296adff60ed9d99382e12659543cd00a7fe03262818e2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.6

Release files / SQLamarr-0.0rc7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL SQLamarr-0.0rc7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c5eee977b6825e009f673e759b36c88900ecd7a3184bd2a750f7b81f24e150b2
BLAKE2b-256 checksum
How to use checksums
7af843acfe1a536468b20145e39fdce517babc98eb49e78d5f3805465bffbdfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.6

Release files / SQLamarr-0.0rc7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL SQLamarr-0.0rc7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ebff593a9a2657119bae3ac5867e1a585bf343be1189277141ac6b903a42d6ea
BLAKE2b-256 checksum
How to use checksums
740ce4bf610eeb92c3f80e8e3e6be036b0f7552fb8b074e866b06e57b92fb75d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.6

Security for SQLamarr 0.0rc7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page