graphdoc.data.dspy_data.generation_data_helper module
- class graphdoc.data.dspy_data.generation_data_helper.GenerationDataHelper[source]
Bases:
DspyDataHelper
A helper class for creating data objects related to our Documentation Generation dspy.Signature.
The example signature is defined as:
` database_schema: str = dspy.InputField() documented_schema: str = dspy.OutputField() `
- static example(inputs: dict[str, Any]) Example [source]
Given a dictionary of inputs, return a dspy.Example object.
- static example_example() Example [source]
Return an example dspy.Example object with the inputs set to the example values.
- Returns:
A dspy.Example object.
- Return type:
dspy.Example
- static model_signature() ModelSignature [source]
Return a mlflow.models.ModelSignature object. Based on the example object, removes the output fields and utilizes the remaining fields to infer the model signature.
- Returns:
A mlflow.models.ModelSignature object.
- Return type:
mlflow.models.ModelSignature
- static prediction(inputs: dict[str, Any]) Prediction [source]
Given a dictionary of inputs, return a dspy.Prediction object.
- static prediction_example() Prediction [source]
Return an example dspy.Prediction object with the inputs set to the example values.
- Returns:
A dspy.Prediction object.
- Return type:
dspy.Prediction