MCPcopy Create free account
hub / github.com/JetBrains-Research/code2seq / test

Function test

code2seq/utils/test.py:7–11  ·  view source on GitHub ↗
(model: LightningModule, data_module: LightningDataModule, seed: Optional[int] = None)

Source from the content-addressed store, hash-verified

5
6
7def test(model: LightningModule, data_module: LightningDataModule, seed: Optional[int] = None):
8 seed_everything(seed)
9 gpu = 1 if torch.cuda.is_available() else None
10 trainer = Trainer(gpus=gpu)
11 trainer.test(model, datamodule=data_module)

Callers 3

test_typed_code2seqFunction · 0.90
test_code2seqFunction · 0.90
test_code2classFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected