Design a model registry that can manage multiple machine learning models and provide efficient access to model metadata. **Example:** Consider a scenario where you have three machine learning models: a linear regression model, a decision tree model, and a random forest model. You want to store model metadata such as model name, model type, and training data in your model registry. **Constraints:** The model registry should be able to handle thousands of models and provide metadata in a format suitable for model deployment.
Test Cases
Test Case 1
Input:
[{"name": "linear_regression", "type": "linear_regression", "data": "customer_database"}, {"name": "decision_tree", "type": "decision_tree", "data": "transaction_log"}, {"name": "random_forest", "type": "random_forest", "data": "customer_database"}]Expected:
{"linear_regression": {'model_type': 'linear_regression', 'training_data': 'customer_database'}, 'decision_tree': {'model_type': 'decision_tree', 'training_data': 'transaction_log'}, 'random_forest': {'model_type': 'random_forest', 'training_data': 'customer_database'}}Test Case 2
Input:
[{"name": "linear_regression", "type": "linear_regression", "data": "customer_database"}, {"name": "decision_tree", "type": "decision_tree", "data": "transaction_log"}, {"name": "random_forest", "type": "random_forest", "data": "customer_database"}]Expected:
{"linear_regression": {'model_type': 'linear_regression', 'training_data': 'customer_database'}, 'decision_tree': {'model_type': 'decision_tree', 'training_data': 'transaction_log'}, 'random_forest': {'model_type': 'random_forest', 'training_data': 'customer_database'}}+ 3 hidden test cases