Installation¶
TLDR
pip install pdstools
Pega Data Scientist Tools (pdstools) is a public Python library and it is published on pypi. As such, you can install it just like any other Python library; using your package manager of choice. We have a strong preference for uv, hence this getting started page is written with the uv workflow as a default. To use another package manager, simply use the corresponding commands.
The recommended uv
workflow:¶
If you haven’t yet, install uv at https://github.com/astral-sh/uv - we would recommend using the standalone installer, as it has a
uv self update
function.If you don’t have one, create a virtual environment - with
uv
installed, simply navigate to your desired directory and runuv venv
Install pdstools in your virtual environment:
uv pip install pdstools
If you do not have Python or no compatible version installed,
uv
will automatically install a compatible version.
Optional dependencies¶
As of V4 of pdstools, we have made a big effort to reduce the number of big and heavy core dependencies. This means that while initial installation is very fast, you may at some points run into import errors and will be required to install additional dependency groups.
To install extra dependencies, you can put them in square brackets after a package name. So, for instance, to install pdstools alongside the optional dependencies for the Pega DX API client, you should run:
uv pip install 'pdstools[api]'
For an overview of all optional dependencies and the dependency groups they will be installed for, see the table below:
[1]:
from pdstools.utils.show_versions import dependency_great_table
dependency_great_table()
[1]:
Optional dependencies | ||||||||||||||||||||
Required | Optional | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typing_extensions | polars==1.16 | requests | st-pages | httpx | aioboto3 | xlsxwriter>=3.0 | skl2onnx==1.17.0 | pydantic | onnxruntime==1.18.1 | anyio | onnx==1.16.1 | polars_hash | pydot | quarto | streamlit>=1.23 | plotly[express]>=6.0.0rc0 | papermill | great_tables>=0.13 | scikit-learn==1.5.1 | |
adm | √ | √ | √ | X | X | X | X | X | X | X | X | X | X | X | X | X | √ | X | X | X |
pega-io | √ | √ | X | X | X | √ | X | X | X | X | X | X | √ | X | X | X | X | X | X | X |
api | √ | √ | X | X | √ | X | X | X | √ | X | √ | X | X | X | X | X | X | X | X | X |
healthcheck | √ | √ | √ | X | X | X | √ | X | X | X | X | X | X | √ | √ | X | √ | √ | √ | X |
app | √ | √ | √ | √ | X | X | √ | X | X | X | X | X | X | √ | √ | √ | √ | √ | √ | X |
onnx | √ | √ | X | X | √ | X | X | √ | √ | √ | √ | √ | X | X | X | X | X | X | X | √ |
all | √ | √ | √ | √ | √ | X | √ | √ | √ | √ | √ | √ | X | √ | √ | √ | √ | √ | √ | √ |
Python compatibility¶
Even though uv takes care of installing your python version, sometimes you have no choice of available versions. For this reason, we try to be as supportive in Python versions as we can; so our latest supported python version depends on our core dependencies, particularly Polars. As of 2024, Polars supports Python version 3.9 and higher, hence so do we.
Getting Started¶
With pdstools installed, you can test that it’s installed properly by recreating the bubble chart, as seen in Prediction Studio, on some sample data:
[2]:
from pdstools import cdh_sample
cdh_sample().plot.bubble_chart()
To run these analyses over your own data, please refer to the ADMDatamart class documentation or for an example of how to use it, refer to the Example ADM Analysis.
To run the Health Check and Model Reports, please refer to the Command Line Interface documentation or the ADM Health Check Article
To analyze the results of a Value Finder simulation run, refer to the ValueFinder class documentation or the Example Value Finder Analysis.
To gain insights from the Explainability Extract or Decision Analyzer datasets, please refer to the DecisionAnalyzer class documentation or the Example Explainability Extract Analysis
For information on how to use the Infinity DX client, please refer to the Infinity class documentation or the Prediction Studio API Explainer article.