prevent cli functions from getting fired on import (#581)
Browse files- src/axolotl/cli/inference.py +2 -1
- src/axolotl/cli/merge_lora.py +2 -1
- src/axolotl/cli/shard.py +2 -1
- src/axolotl/cli/train.py +2 -1
src/axolotl/cli/inference.py
CHANGED
@@ -23,4 +23,5 @@ def do_cli(config: Path = Path("examples/"), **kwargs):
|
|
23 |
do_inference(cfg=parsed_cfg, cli_args=parsed_cli_args)
|
24 |
|
25 |
|
26 |
-
|
|
|
|
23 |
do_inference(cfg=parsed_cfg, cli_args=parsed_cli_args)
|
24 |
|
25 |
|
26 |
+
if __name__ == "__main__":
|
27 |
+
fire.Fire(do_cli)
|
src/axolotl/cli/merge_lora.py
CHANGED
@@ -23,4 +23,5 @@ def do_cli(config: Path = Path("examples/"), **kwargs):
|
|
23 |
do_merge_lora(cfg=parsed_cfg, cli_args=parsed_cli_args)
|
24 |
|
25 |
|
26 |
-
|
|
|
|
23 |
do_merge_lora(cfg=parsed_cfg, cli_args=parsed_cli_args)
|
24 |
|
25 |
|
26 |
+
if __name__ == "__main__":
|
27 |
+
fire.Fire(do_cli)
|
src/axolotl/cli/shard.py
CHANGED
@@ -38,4 +38,5 @@ def do_cli(config: Path = Path("examples/"), **kwargs):
|
|
38 |
shard(cfg=parsed_cfg, cli_args=parsed_cli_args)
|
39 |
|
40 |
|
41 |
-
|
|
|
|
38 |
shard(cfg=parsed_cfg, cli_args=parsed_cli_args)
|
39 |
|
40 |
|
41 |
+
if __name__ == "__main__":
|
42 |
+
fire.Fire(do_cli)
|
src/axolotl/cli/train.py
CHANGED
@@ -32,4 +32,5 @@ def do_cli(config: Path = Path("examples/"), **kwargs):
|
|
32 |
train(cfg=parsed_cfg, cli_args=parsed_cli_args, dataset_meta=dataset_meta)
|
33 |
|
34 |
|
35 |
-
|
|
|
|
32 |
train(cfg=parsed_cfg, cli_args=parsed_cli_args, dataset_meta=dataset_meta)
|
33 |
|
34 |
|
35 |
+
if __name__ == "__main__":
|
36 |
+
fire.Fire(do_cli)
|