-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathsegment.py
More file actions
32 lines (22 loc) · 838 Bytes
/
Copy pathsegment.py
File metadata and controls
32 lines (22 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
Command line interface to run the neural network model!
From the project root directory, do:
python segment.py fit --config configs/segment_chesapeake.yaml
References:
- https://lightning.ai/docs/pytorch/2.1.0/cli/lightning_cli.html
- https://pytorch-lightning.medium.com/introducing-lightningcli-v2-supercharge-your-training-c070d43c7dd6
"""
from lightning.pytorch.cli import LightningCLI
from finetune.segment.chesapeake_datamodule import ChesapeakeDataModule # noqa: F401
from finetune.segment.chesapeake_model import ChesapeakeSegmentor # noqa: F401
# %%
def cli_main():
"""
Command-line interface to run Segmentation Model with ChesapeakeDataModule.
"""
cli = LightningCLI(ChesapeakeSegmentor, ChesapeakeDataModule)
return cli
# %%
if __name__ == "__main__":
cli_main()
print("Done!")