MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / test_full_mode_inference

Function test_full_mode_inference

SwissArmyTransformer/tests/test_inference.py:38–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 a = model(input_ids=x, position_ids=x, attention_mask=None)
37
38def test_full_mode_inference():
39 args = get_args(['--zero-stage', '1'])
40 from sat.model import RobertaModel, AutoModel
41 model, args1 = RobertaModel.from_pretrained('roberta-base')
42 x = torch.tensor([[1,2,3]], device='cuda')
43 a = model(input_ids=x, position_ids=x, attention_mask=None)
44
45if __name__ == '__main__':
46 # test_model_inference()

Callers

nothing calls this directly

Calls 2

get_argsFunction · 0.90
from_pretrainedMethod · 0.45

Tested by

no test coverage detected