Files
gloamxun e0feabec8f Initialize optimizer research workspace with official baselines and history-free coverage
Vendor pinned MeZO, AGZO, LOZO and LoREN sources with independent environments. Add direct in-place fix/adjust/node training, derived history-free basis gradients, development-best checkpoints and experiment tooling. Keep models, datasets, caches and credentials outside Git.

Validation: 93 project tests passed; 521 vendored author files verified.
2026-11-12 23:32:33 +08:00

30 lines
868 B
Python

from .glue import GLUEDataModule, GLUE_TASKS
from .superglue import SuperGLUEDataModule, SUPERGLUE_TASKS
__all__ = ['GLUEDataModule', 'GLUE_TASKS', 'SuperGLUEDataModule', 'SUPERGLUE_TASKS']
def get_data_module(args):
if args.task in GLUE_TASKS:
dm_class = GLUEDataModule
elif args.task in SUPERGLUE_TASKS:
dm_class = SuperGLUEDataModule
else:
raise ValueError(f"Task {args.task} is not supported")
dm = dm_class(
model_name_or_path=args.model_name,
task_name=args.task,
max_seq_length=args.max_seq_length,
sample_size=args.samplesize,
train_batch_size=args.batchsize,
validation_sample_size=args.samplesize_validation,
eval_batch_size=args.batchsize,
soft_prompt=args.soft_prompt,
hf_token=args.hf_token
)
dm.setup(stage='fit')
return dm