docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This evaluation assesses how effectively the engineer uses the jsons library to serialize and deserialize Python classes that use __slots__ for memory optimization. The focus is on correct usage of jsons.dump() and jsons.load() functions with slotted classes, including handling of nested slotted objects.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Slotted Classes Definition",
"description": "All three classes (ServerConfig, DatabaseConfig, ApplicationConfig) correctly define __slots__ with the specified attributes and implement __init__ methods to initialize those attributes.",
"max_score": 15
},
{
"name": "jsons.dump() Usage",
"description": "Uses jsons.dump() function to serialize slotted class instances to dictionaries. Should be used for all three classes (ServerConfig, DatabaseConfig, ApplicationConfig).",
"max_score": 20
},
{
"name": "jsons.load() Usage",
"description": "Uses jsons.load() function with the target class type to deserialize dictionaries back into slotted class instances. Should be used for all three classes.",
"max_score": 20
},
{
"name": "Nested Slotted Objects",
"description": "Correctly handles serialization and deserialization of nested slotted objects (ApplicationConfig containing ServerConfig and DatabaseConfig instances). The jsons library should automatically handle the nested structure without manual intervention.",
"max_score": 25
},
{
"name": "Type Hints",
"description": "Includes appropriate type hints on __init__ methods or class-level annotations to enable jsons to properly deserialize nested slotted objects (e.g., server: ServerConfig, database: DatabaseConfig).",
"max_score": 15
},
{
"name": "Test Implementation",
"description": "All six test cases are implemented and correctly verify serialization and deserialization behavior for all three slotted classes, including nested objects.",
"max_score": 5
}
]
}