-
Notifications
You must be signed in to change notification settings - Fork 0
Signers_stories
US Model Signature Generation : Generate signatures for AI/ML models.
classDiagram
direction LR
class Signer {
<<abstract>>
+KIND: str
+sign(inputs: schemas.Inputs, outputs: schemas.Outputs) Signature*
}
Signer --|> pdt.BaseModel : inherits
Signer --|> abc.ABC : inherits
class InferSigner {
+KIND: T.Literal["InferSigner"] = "InferSigner"
+sign(inputs: schemas.Inputs, outputs: schemas.Outputs) Signature
}
InferSigner --|> Signer : inherits
class Signature {
<<type>>
ms.ModelSignature
}
class schemas.Inputs {
<<external>>
}
class schemas.Outputs {
<<external>>
}
Signer --> schemas.Inputs : "uses"
Signer --> schemas.Outputs : "uses"
Signer --> Signature : "returns"
InferSigner --> mlflow.models.infer_signature : "uses"
Title:
As a data scientist, I want to configure a model signer to generate the model signatures, so that I can validate input and output formats after training.
Description:
The Signer abstract class allows for creating different signing strategies for models, enabling flexibility in how signatures are generated.
Acceptance Criteria:
- The signer class can be configured with specific signing strategies.
- Default implementations may be available while allowing users to define custom strategies.
Title:
As a data engineer, I want to generate model signatures based on the input and output structures, so that I can ensure the integrity of model interfaces.
Description:
The sign method of the Signer class generates a model signature using the provided inputs and outputs.
Acceptance Criteria:
- The method accurately captures the information from inputs and outputs to create the signature.
- The generated signature is usable in downstream applications, such as model deployment or tracking.
Title:
As a data scientist, I want to use the built-in inference capabilities to automatically generate signatures from model inputs and outputs, so I can simplify the signature generation process.
Description:
The InferSigner class provides functionality that leverages the MLflow library to automatically infer signatures based on the model's data.
Acceptance Criteria:
- Model signatures are generated accurately using the
InferSignerstrategy. - The inference correctly captures the structure of both inputs and outputs based on the received data.
-
Implementation Requirements:
- The
Signerand its child classes are structured in a way that supports flexibility and extensibility of signing strategies. - Clear abstractions are provided for signing methods to ensure consistent interface usage.
- The
-
Error Handling:
- Any issues encountered during the signature generation process are logged, with informative messages describing the nature of the error.
-
Testing:
- Unit tests validate the creation and functionality of different signer implementations.
- Tests ensure that signatures reflect accurately based on provided inputs and outputs.
-
Documentation:
- Each method and class should contain comprehensive docstrings to describe how they function.
- Examples demonstrating how to use both
SignerandInferSignershould be included for user guidance.
- The
SignerandInferSignerclasses are fully implemented and functioning as intended. - All user stories are tested, and acceptance criteria are met.
- Documentation is comprehensive and provides clear instructions on how to utilize signing functionality.
Powered by MLOps Factory