How hfut-lec/edustudio works
Overall System Purpose and Pipeline
• Pipeline defined in the README, which splits the modeling workflow into six main steps:
– Configuration Reading
– Data Preparation
– Model Implementation
– Training Control
– Model Evaluation
– Log Storage
Key Components and Their Locations (Based on File Tree)
• Configuration & Core Bootstrapping
– Files like edustudio/settings.py and quickstart modules (edustudio/quickstart) are responsible for initializing and handling configuration and quick-start routines.
• Data Preparation (Data Templates)
– The directory edustudio/datatpl contains different subdirectories for CD and KT (e.g., CD, KT, and common utilities). These handle dataset formatting and pre-processing by way of templatized data wrappers.
• Atom Operations
– The edustudio/atom_op module contains two major functionalities: “raw2mid” (converting raw data formats to intermediate representations) and “mid2cache” (caching or reorganizing intermediate data). These components are essential preprocessing steps and are modular in nature (with separate support for CD and KT).
• Model Implementation
– Under edustudio/model, separate directories contain implementations for both CD and KT. The subdirectories for CD and KT provide model definitions, loss functions, and associated components. Additionally, there are utility components in edustudio/model/utils and shared base classes like edustudio/model/basemodel.py.
• Training Control (Training Templates)
– The edustudio/traintpl directory contains different training workflow templates (e.g., GeneralTrainTPL, adversarial_traintpl, etc.), which manage the training loops and control logic.
• Evaluation Templates
– The edustudio/evaltpl folder includes modules that define evaluation strategies like prediction, interpretability, fairness, etc.
• Utility and Callbacks
– In edustudio/utils and its subdirectories (especially callback modules), the project implements logging, early stopping, checkpointing, and other helper utilities used across training or evaluation stages.
• Documentation and Examples
– The docs and examples folders provide additional context and demonstration scripts (e.g., examples/1.run_cd_demo.py). They serve as references for integrating and testing the modular components.
Relationships and Data Flow
• From configuration, flow straight into Data Preparation:
– Link configuration to Data Templates (datatpl), showing that parameters influence how input data is parsed and pre-processed.
• Atom Operations act as intermediate preprocessors that convert raw data into formats usable by models:
• Once the data is prepared, it is passed to Model Implementations:
– Indicate that the model templates (located in edustudio/model) receive processed data and are configured via parameters.
• The Training Template (traintpl) receives the model (and training configuration) and orchestrates the training process:
– Show directional flow from the model components to the training templates.
• After training, models are evaluated using the Evaluation Templates (evaltpl):
• Throughout, utilities (callbacks, logger, configuration utilities) support these modules:
Architectural Patterns and Design Principles
• The modularity and templatization approach is key:
• Separation of concerns:
• Configurable Workflow:
– Represent that the quickstart command links these modules using configuration dictionaries, meaning the pipeline can be recombined for different experiments.