-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathtangram.ts
112 lines (112 loc) · 2.94 KB
/
tangram.ts
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
const completionSpec: Fig.Spec = {
name: "tangram",
description: "",
subcommands: [
{
name: "app",
description: "Run the app",
options: [
{
name: ["-c", "--config"],
description: "The path to a config file",
args: {
name: "CONFIG",
template: "filepaths",
},
},
],
},
{
name: "migrate",
description: "Migrate your app database",
options: [
{
name: "--database-url",
args: {
name: "DATABASE_URL",
},
},
],
},
{
name: "predict",
description: "Make predictions with a model",
options: [
{
name: ["-f", "--file"],
description: "The path to read examples from, defaults to stdin",
args: { name: "FILE", template: "filepaths" },
},
{
name: ["-m", "--model"],
description: "The path to the model to make predictions with",
args: { name: "MODEL", template: "filepaths" },
},
{
name: ["-o", "--output"],
description:
"The path to write the predictions to, defaults to stdout",
args: { name: "OUTPUT", template: "filepaths" },
},
{
name: ["-p", "--probabilities"],
description:
"Output probabilities instead of class labels, only relevant for classifier models",
args: { name: "PROBABILITIES" },
},
],
},
{
name: "train",
description: "Train a model",
options: [
{
name: ["-c", "--config"],
description: "The path to a config file",
args: {
name: "CONFIG",
template: "filepaths",
},
},
{
name: ["-f", "--file"],
description: "The path to your .csv file",
args: { name: "FILE", template: "filepaths" },
},
{
name: "--file-test",
description: "The path to your .csv file used for testing",
args: { name: "FILE_TEST", template: "filepaths" },
},
{
name: "--file-train",
description: "The path to your .csv file used for training",
args: { name: "FILE_TRAIN", template: "filepaths" },
},
{
name: ["-o", "--output"],
description: "The path to write the .tangram file to",
args: { name: "OUTPUT", template: "filepaths" },
},
{
name: ["-t", "--target"],
description: "The name of the column to predict",
args: { name: "TARGET" },
},
],
},
],
options: [
{
name: ["--help", "-h"],
description: "Print help information",
},
{
name: ["--version", "-v"],
description: "Print version information",
},
],
// Only uncomment if tangram takes an argument
// args: {}
};
export default completionSpec;