<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_memory(cls, model_data: dict, run_number: int, project_dir: str, continue_training=False, seed: int = None, device: str = 'cuda', params=None):
 """ Create model config from supplied data """

        return ModelConfig(
            filename="[memory]",
            configuration=model_data,
            run_number=run_number,
            project_dir=project_dir,
            continue_training=continue_training,
            seed=seed,
            device=device,
            parameters=params
        )