@@ -46,41 +46,41 @@ type StatusUpdater interface {
4646// Objective is the representation of one of the element type stored in the ledger
4747type Objective struct {
4848 Name string `json:"name"`
49- AssetType AssetType `json:"assetType "`
50- DescriptionStorageAddress string `json:"descriptionStorageAddress "`
49+ AssetType AssetType `json:"asset_type "`
50+ DescriptionStorageAddress string `json:"description_storage_address "`
5151 Metrics * HashDressName `json:"metrics"`
5252 Owner string `json:"owner"`
53- TestDataset * Dataset `json:"testDataset "`
53+ TestDataset * Dataset `json:"test_dataset "`
5454 Permissions Permissions `json:"permissions"`
5555 Metadata map [string ]string `json:"metadata"`
5656}
5757
5858// DataManager is the representation of one of the elements type stored in the ledger
5959type DataManager struct {
6060 Name string `json:"name"`
61- AssetType AssetType `json:"assetType "`
62- OpenerStorageAddress string `json:"openerStorageAddress "`
61+ AssetType AssetType `json:"asset_type "`
62+ OpenerStorageAddress string `json:"opener_storage_address "`
6363 Type string `json:"type"`
6464 Description * HashDress `json:"description"`
6565 Owner string `json:"owner"`
66- ObjectiveKey string `json:"objectiveKey "`
66+ ObjectiveKey string `json:"objective_key "`
6767 Permissions Permissions `json:"permissions"`
6868 Metadata map [string ]string `json:"metadata"`
6969}
7070
7171// DataSample is the representation of one of the element type stored in the ledger
7272type DataSample struct {
73- AssetType AssetType `json:"assetType "`
74- DataManagerKeys []string `json:"dataManagerKeys "`
73+ AssetType AssetType `json:"asset_type "`
74+ DataManagerKeys []string `json:"data_manager_keys "`
7575 Owner string `json:"owner"`
7676 TestOnly bool `json:"testOnly"`
7777}
7878
7979// Algo is the representation of one of the element type stored in the ledger
8080type Algo struct {
8181 Name string `json:"name"`
82- AssetType AssetType `json:"assetType "`
83- StorageAddress string `json:"storageAddress "`
82+ AssetType AssetType `json:"asset_type "`
83+ StorageAddress string `json:"storage_address "`
8484 Description * HashDress `json:"description"`
8585 Owner string `json:"owner"`
8686 Permissions Permissions `json:"permissions"`
@@ -101,9 +101,9 @@ type AggregateAlgo struct {
101101// that are common to Traintuple, CompositeTraintuple and
102102// AggregateTuple
103103type GenericTuple struct {
104- AssetType AssetType `json:"assetType "`
105- AlgoKey string `json:"algoKey "`
106- ComputePlanID string `json:"computePlanID "`
104+ AssetType AssetType `json:"asset_type "`
105+ AlgoKey string `json:"algo_key "`
106+ ComputePlanID string `json:"compute_plan_id "`
107107 Creator string `json:"creator"`
108108 Log string `json:"log"`
109109 Metadata map [string ]string `json:"metadata"`
@@ -114,79 +114,79 @@ type GenericTuple struct {
114114
115115// Traintuple is the representation of one the element type stored in the ledger. It describes a training task occuring on the platform
116116type Traintuple struct {
117- AssetType AssetType `json:"assetType "`
118- AlgoKey string `json:"algoKey "`
119- ComputePlanID string `json:"computePlanID "`
117+ AssetType AssetType `json:"asset_type "`
118+ AlgoKey string `json:"algo_key "`
119+ ComputePlanID string `json:"compute_plan_id "`
120120 Creator string `json:"creator"`
121121 Log string `json:"log"`
122122 Metadata map [string ]string `json:"metadata"`
123123 Rank int `json:"rank"`
124124 Status string `json:"status"`
125125 Tag string `json:"tag"`
126126 Dataset * Dataset `json:"dataset"`
127- InModelKeys []string `json:"inModels "`
128- OutModel * HashDress `json:"outModel "`
127+ InModelKeys []string `json:"in_models "`
128+ OutModel * HashDress `json:"out_model "`
129129 Permissions Permissions `json:"permissions"`
130130}
131131
132132// CompositeTraintuple is like a traintuple, but for composite model composition
133133type CompositeTraintuple struct {
134- AssetType AssetType `json:"assetType "`
135- AlgoKey string `json:"algoKey "`
136- ComputePlanID string `json:"computePlanID "`
134+ AssetType AssetType `json:"asset_type "`
135+ AlgoKey string `json:"algo_key "`
136+ ComputePlanID string `json:"compute_plan_id "`
137137 Creator string `json:"creator"`
138138 Log string `json:"log"`
139139 Metadata map [string ]string `json:"metadata"`
140140 Rank int `json:"rank"`
141141 Status string `json:"status"`
142142 Tag string `json:"tag"`
143143 Dataset * Dataset `json:"dataset"`
144- InHeadModel string `json:"inHeadModel "`
145- InTrunkModel string `json:"inTrunkModel "`
146- OutHeadModel CompositeTraintupleOutHeadModel `json:"outHeadModel "`
147- OutTrunkModel CompositeTraintupleOutModel `json:"outTrunkModel "`
144+ InHeadModel string `json:"in_head_model "`
145+ InTrunkModel string `json:"in_trunk_model "`
146+ OutHeadModel CompositeTraintupleOutHeadModel `json:"out_head_model "`
147+ OutTrunkModel CompositeTraintupleOutModel `json:"out_trunk_model "`
148148}
149149
150150// Aggregatetuple is like a traintuple, but for aggregate model composition
151151type Aggregatetuple struct {
152- AssetType AssetType `json:"assetType "`
153- AlgoKey string `json:"algoKey "`
154- ComputePlanID string `json:"computePlanID "`
152+ AssetType AssetType `json:"asset_type "`
153+ AlgoKey string `json:"algo_key "`
154+ ComputePlanID string `json:"compute_plan_id "`
155155 Creator string `json:"creator"`
156156 Log string `json:"log"`
157157 Metadata map [string ]string `json:"metadata"`
158158 Rank int `json:"rank"`
159159 Status string `json:"status"`
160160 Tag string `json:"tag"`
161- InModelKeys []string `json:"inModels "`
162- OutModel * HashDress `json:"outModel "`
161+ InModelKeys []string `json:"in_models "`
162+ OutModel * HashDress `json:"out_model "`
163163 Permissions Permissions `json:"permissions"` // TODO (aggregate): what do permissions mean here?
164164 Worker string `json:"worker"`
165165}
166166
167167// CompositeTraintupleOutModel is the out-model of a CompositeTraintuple
168168type CompositeTraintupleOutModel struct {
169- OutModel * HashDress `json:"outModel "`
169+ OutModel * HashDress `json:"out_model "`
170170 Permissions Permissions `json:"permissions"`
171171}
172172
173173// CompositeTraintupleOutHeadModel is the out-model of a CompositeTraintuple
174174type CompositeTraintupleOutHeadModel struct {
175- OutModel * Hash `json:"outModel "`
175+ OutModel * Hash `json:"out_model "`
176176 Permissions Permissions `json:"permissions"`
177177}
178178
179179// Testtuple is the representation of one the element type stored in the ledger. It describes a training task occuring on the platform
180180type Testtuple struct {
181181 AlgoKey string `json:"algo"`
182- AssetType AssetType `json:"assetType "`
182+ AssetType AssetType `json:"asset_type "`
183183 Certified bool `json:"certified"`
184- ComputePlanID string `json:"computePlanID "`
184+ ComputePlanID string `json:"compute_plan_id "`
185185 Creator string `json:"creator"`
186186 Dataset * TtDataset `json:"dataset"`
187187 Log string `json:"log"`
188188 Metadata map [string ]string `json:"metadata"`
189- TraintupleKey string `json:"traintupleKey "`
189+ TraintupleKey string `json:"traintuple_key "`
190190 ObjectiveKey string `json:"objective"`
191191 Permissions Permissions `json:"permissions"`
192192 Rank int `json:"rank"`
@@ -196,27 +196,27 @@ type Testtuple struct {
196196
197197// ComputePlan is the ledger's representation of a compute plan.
198198type ComputePlan struct {
199- AggregatetupleKeys []string `json:"aggregatetupleKeys "`
200- AssetType AssetType `json:"assetType "`
201- CleanModels bool `json:"cleanModels "` // whether or not to delete intermediary models
202- CompositeTraintupleKeys []string `json:"compositeTraintupleKeys "`
203- IDToTrainTask map [string ]TrainTask `json:"IDToTrainTask "`
199+ AggregatetupleKeys []string `json:"aggregatetuple_keys "`
200+ AssetType AssetType `json:"asset_type "`
201+ CleanModels bool `json:"clean_models "` // whether or not to delete intermediary models
202+ CompositeTraintupleKeys []string `json:"composite_traintuple_keys "`
203+ IDToTrainTask map [string ]TrainTask `json:"id_to_train_task "`
204204 Metadata map [string ]string `json:"metadata"`
205205 State ComputePlanState `json:"-"` // "-" means this field is excluded from JSON (de)serialization
206- StateKey string `json:"stateKey "`
206+ StateKey string `json:"state_key "`
207207 Tag string `json:"tag"`
208- TesttupleKeys []string `json:"testtupleKeys "`
209- TraintupleKeys []string `json:"traintupleKeys "`
208+ TesttupleKeys []string `json:"testtuple_keys "`
209+ TraintupleKeys []string `json:"traintuple_keys "`
210210}
211211
212212// ComputePlanState is the ledger's representation of the compute plan state.
213213// To minimize the size of every compute plan, update its state record under another
214214// key in the ledger. It will reduce the growing rate of the blockchain size.
215215type ComputePlanState struct {
216- DoneCount int `json:"doneCount "`
217- IntermediaryModelsInUse []string `json:"intermediaryModelsInUse "`
216+ DoneCount int `json:"done_count "`
217+ IntermediaryModelsInUse []string `json:"intermediary_models_in_use "`
218218 Status string `json:"status"`
219- TupleCount int `json:"tupleCount "`
219+ TupleCount int `json:"tuple_count "`
220220}
221221
222222// TrainTask is represent the information for one tuple in a Compute Plan
@@ -237,27 +237,27 @@ type Hash struct {
237237// HashDress stores a hash and a Storage Address
238238type HashDress struct {
239239 Hash string `json:"hash"`
240- StorageAddress string `json:"storageAddress "`
240+ StorageAddress string `json:"storage_address "`
241241}
242242
243243// HashDressName stores a hash, storage address and a name
244244type HashDressName struct {
245245 Name string `json:"name"`
246246 Hash string `json:"hash"`
247- StorageAddress string `json:"storageAddress "`
247+ StorageAddress string `json:"storage_address "`
248248}
249249
250250// Model stores the traintupleKey leading to the model, its hash and storage addressl
251251type Model struct {
252- TraintupleKey string `json:"traintupleKey "`
252+ TraintupleKey string `json:"traintuple_key "`
253253 Hash string `json:"hash"`
254- StorageAddress string `json:"storageAddress "`
254+ StorageAddress string `json:"storage_address "`
255255}
256256
257257// Dataset stores info about a dataManagerKey and a list of associated dataSample
258258type Dataset struct {
259- DataManagerKey string `json:"dataManagerKey "`
260- DataSampleKeys []string `json:"dataSampleKeys "`
259+ DataManagerKey string `json:"data_manager_key "`
260+ DataSampleKeys []string `json:"data_sample_keys "`
261261 Metadata map [string ]string `json:"metadata"`
262262 Worker string `json:"worker"`
263263}
@@ -270,7 +270,7 @@ type Dataset struct {
270270type TtDataset struct {
271271 Worker string `json:"worker"`
272272 DataSampleKeys []string `json:"keys"`
273- OpenerHash string `json:"openerHash "`
273+ OpenerHash string `json:"opener_hash "`
274274 Perf float32 `json:"perf"`
275275}
276276
0 commit comments