MCPcopy Create free account
hub / github.com/FreedomIntelligence/CMB / from_config

Method from_config

workers/base.py:53–75  ·  view source on GitHub ↗
(
        cls, 
        cfg, 
        input_pth: str = '',
        output_pth: str = '',
        batch_size = 1,
        use_qa = False, 
        use_cot = False,
        generate_fewshot_examples_only = False,
        use_fewshot = False,
        )

Source from the content-addressed store, hash-verified

51
52 @classmethod
53 def from_config(
54 cls,
55 cfg,
56 input_pth: str = '',
57 output_pth: str = '',
58 batch_size = 1,
59 use_qa = False,
60 use_cot = False,
61 generate_fewshot_examples_only = False,
62 use_fewshot = False,
63 ):
64 assert cfg.get('load', None) is not None
65
66 return cls(
67 cfg,
68 input_pth,
69 output_pth,
70 batch_size,
71 use_cot = use_cot,
72 use_qa = use_qa,
73 generate_fewshot_examples_only = generate_fewshot_examples_only,
74 use_fewshot = use_fewshot,
75 )
76
77
78 def load_model_and_tokenizer(self, load_config):

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected