Using plugins¶
This page explains how to seamlessly use a 3rd party lib's plugin in RAITAP.
Some libraries are implemented as 1st party in RIAITAP directly, but some others simply ship a plugin. The user-facing behaviour is identical.
Tip
Are you a library maintainer wanting to ship your own adapter as a plugin? See Writing a plugin.
1. Install¶
Install the plugin next to RAITAP:
uv add raitap raitap-superxai
pip install raitap raitap-superxai
That's it. Every installed plugin is discovered automatically.
2. Use it¶
Reference the adapter by its registry_name (here, superxai), exactly like a
built-in adapter.
transparency:
my_run:
_target_: "raitap_superxai.SuperXAIExplainer" # full import path — plugin classes live outside raitap.*
algorithm: supertreeshap
from raitap.transparency import superxai
transparency = {"my_run": superxai(algorithm="supertreeshap")}
In YAML, use the plugin class's full import path (raitap_superxai.SuperXAIExplainer):
a bare _target_: SuperXAIExplainer only resolves for built-in adapters. The
Python form needs no path — superxai already carries it. The
+transparency=superxai CLI shorthand also works if the plugin ships a
matching preset.
If a plugin doesn't show up¶
Version mismatch. A plugin declares which RAITAP versions it supports. If your installed RAITAP is outside that range (or the plugin declares no range), RAITAP skips it and logs a warning — check your run's logs and upgrade the plugin or RAITAP as needed.
A plugin crashed on load. A broken plugin is logged (by name) and skipped; it never breaks your run. The warning names the culprit.
Disable all plugins. Set
RAITAP_DISABLE_PLUGINS=1to ignore every installed plugin — useful for reproducing an issue without third-party code.