Flatten a nested dictionary into a flat dictionary.
Hash a string using sha1.
Import the pandas python package and raise an error if it is not installed.
Import the spacy python package and raise an error if it is not installed.
Import the textstat python package and raise an error if it is not installed.
Import the mlflow python package and raise an error if it is not installed.
Get the metrics to log to MLFlow.
Get the text complexity metrics from textstat.
Analyze text using textstat and spacy.
Construct an html element from a prompt and a generation.
Handle the metadata and associated function states for callbacks.
Callback Handler that logs metrics and artifacts to mlflow server.
Callback Handler that logs metrics and artifacts to mlflow server.