MCPcopy Index your code
hub / github.com/OpenGVLab/InternVL / eval

Function eval

classification/main_accelerate.py:292–298  ·  view source on GitHub ↗
(config, accelerator: Accelerator)

Source from the content-addressed store, hash-verified

290
291
292def eval(config, accelerator: Accelerator):
293 _, _, _, _, validate_dataloader, _, _ = build_loader2(config)
294 model = build_model(config)
295 model, validate_dataloader = accelerator.prepare(model, validate_dataloader)
296 model = load_model_checkpoint(config, model, accelerator)
297 log_model_statistic(accelerator.unwrap_model(model))
298 eval_epoch(config=config, data_loader=validate_dataloader, model=model, accelerator=accelerator)
299
300
301def train(config, accelerator: Accelerator):

Callers 1

mainFunction · 0.70

Calls 5

build_loader2Function · 0.90
build_modelFunction · 0.90
load_model_checkpointFunction · 0.85
log_model_statisticFunction · 0.70
eval_epochFunction · 0.70

Tested by

no test coverage detected