Skip to main content

AISC Plugin Interface

This repository provides the base interface for writing evaluation plugins.

If you are new to the platform, start here:

That guide covers:

  • the plugin contract and discovery model
  • how to create a plugin project
  • how to implement configuration, inputs, metrics, and progress reporting
  • optional integration hooks and current extension points
  • common failure modes and architectural feedback areas

Quick Start

Create a new plugin project:

mkdir my-aisc-plugin
cd my-aisc-plugin
uv init --lib
uv add git+https://github.com/lux-ai-factory/aisc-plugin-interface

Implement a plugin class that inherits from BaseEvaluationPlugin[T], then export it from your package __init__.py.

Minimal example:

from typing import Any

from aisc_plugin_interface.models.measure import Measure
from aisc_plugin_interface.base_evaluation_plugin import metric, BaseEvaluationPlugin
from pydantic import BaseModel, Field

from aisc_plugin_interface import BaseEvaluationPlugin, Measure, metric


class ConfigFormSchema(BaseModel):
    threshold: float = Field(default=0.5, ge=0.0, le=1.0)


class MyPlugin(BaseEvaluationPlugin[ConfigFormSchema]):
    def evaluate(self, config_data: dict) -> Any:
        # Dependencies only used during evaluation should be imported locally here
        import numpy as np

        # Access configuration form data
        config: ConfigFormSchema = self.validate_config_form_data(config_data)
        threshold: float = config.threshold
        
        # Your evaluation logic here

        # Use self.logger for logging
        self.logger.info("Evaluation completed successfully")
        
        return {"MyMetric": [0.99, 0.5, 0.67], "OtherMetric": [0.01, 0.22, 0.77]}


    @metric("MyMetric")
    def my_metric(self, evaluation_output: Any) -> list[Measure]:
        values = evaluation_output.get("MyMetric", [])
        return [Measure(name="MyMetric", score=value) for value in values]

Export it:

from .plugin import MyPlugin

__all__ = ["MyPlugin"]

For the full development workflow, use the guide above.


License

This project is licensed under the Apache License 2.0.
© 2024–2026 Université du Luxembourg and Luxembourg Institute of Science and Technology (LIST). Originally developed within the SerVal Research Group and the Interdisciplinary Centre for Security, Reliability and Trust (SnT).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aisc_plugin_interface-0.2.6.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aisc_plugin_interface-0.2.6-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file aisc_plugin_interface-0.2.6.tar.gz.

File metadata

File hashes

Hashes for aisc_plugin_interface-0.2.6.tar.gz
Algorithm Hash digest
SHA256 762e888593cefb9e3715e19c3de9aba38f09af2c3e13fa148b4c0ad5c34c3464
MD5 85ca0913ec13ebc7133ad7b465822763
BLAKE2b-256 3b3b7b1a553c486d7cfdd41867659ee19aa73b6c2251b9425ac3ed7eb7127f92

See more details on using hashes here.

File details

Details for the file aisc_plugin_interface-0.2.6-py3-none-any.whl.

File metadata

File hashes

Hashes for aisc_plugin_interface-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 880c715a55353475e4a4f044ea51179d0afe3602541ab2e297910979f97bd8fe
MD5 39d7027627639d57e7a1fb25da1a1ac8
BLAKE2b-256 b1b7f2018d43bdc255d29ebca5e4ee053f7dae138777df0da7540a75c1e11df9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 files

0.2.5

2 files

0.2.4

2 files

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