Installation#
Basic install#
Install the latest release from PyPI:
pip install scope-profiler
This pulls in the only hard dependencies: numpy and h5py.
Optional extras#
scope-profiler ships several optional dependency groups that you can install with the bracket syntax:
Extra |
Install command |
What it adds |
|---|---|---|
|
|
Line-by-line profiling via line_profiler |
|
|
MPI support via mpi4py |
|
|
All of the above plus linting, formatting, and docs tools |
Development install#
Clone the repository and install in editable mode with all development dependencies:
git clone https://github.com/max-models/scope-profiler.git
cd scope-profiler
pip install -e ".[dev]"
LIKWID (optional)#
LIKWID hardware counter support requires the LIKWID library and the pylikwid Python bindings to be installed on the system. See the LIKWID documentation for build instructions.
Verify installation#
>>> from scope_profiler import ProfileManager
>>> ProfileManager.setup()
>>> with ProfileManager.profile_region("test"):
... pass
>>> ProfileManager.finalize()
Region: test
Total Calls : 1
...