Skip to content

Commit

Permalink
[NERLPLANNER] Fix issue of ModelType bool when integer is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
leondavi committed Mar 22, 2024
1 parent e38e893 commit 690101f
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"connectionsMap":
{
"r1":["mainServer", "r2"],
"r2":["r3", "s1"],
"r3":["r4", "c1","s2"],
"r4":["r5", "c2","s3"],
"r5":["r6", "c3"],
"r6":["r3", "r4"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"nerlnetSettings": {
"frequency": "50",
"batchSize": "100"
},
"mainServer": {
"port": "8844",
"args": ""
},
"apiServer": {
"port": "8845",
"args": ""
},
"devices": [
{
"name": "mac",
"ipv4": "192.168.0.248",
"entities": "c3,r1,r4,r5,r6,s1,mainServer,apiServer"
},
{
"name": "jet1",
"ipv4": "192.168.0.226",
"entities": "c1,r2,s2"
},
{
"name": "jet2",
"ipv4": "192.168.0.228",
"entities": "c2,r3,s3"
}
],
"routers": [
{
"name": "r1",
"port": "8900",
"policy": "0"
},
{
"name": "r2",
"port": "8902",
"policy": "0"
},
{
"name": "r3",
"port": "8903",
"policy": "0"
},
{
"name": "r4",
"port": "8904",
"policy": "0"
},
{
"name": "r5",
"port": "8905",
"policy": "0"
},
{
"name": "r6",
"port": "8906",
"policy": "0"
}
],
"sources": [
{
"name": "s1",
"port": "8853",
"frequency": "50",
"policy": "0",
"epochs": "1",
"type": "0"
},
{
"name": "s2",
"port": "8854",
"frequency": "50",
"policy": "0",
"epochs": "1",
"type": "0"
},
{
"name": "s3",
"port": "8855",
"frequency": "50",
"policy": "0",
"epochs": "1",
"type": "0"
}
],
"clients": [
{
"name": "c1",
"port": "8846",
"workers": "w1,w2"
},
{
"name": "c2",
"port": "8847",
"workers": "w3,w4"
},
{
"name": "c3",
"port": "8851",
"workers": "w5"
}
],
"workers": [
{
"name": "w1",
"model_sha": "1f3078160da415bda29a65e6c854f938c291d38166d0cb6e89cec2fd81678613"
},
{
"name": "w2",
"model_sha": "1f3078160da415bda29a65e6c854f938c291d38166d0cb6e89cec2fd81678613"
},
{
"name": "w3",
"model_sha": "1f3078160da415bda29a65e6c854f938c291d38166d0cb6e89cec2fd81678613"
},
{
"name": "w4",
"model_sha": "1f3078160da415bda29a65e6c854f938c291d38166d0cb6e89cec2fd81678613"
},
{
"name": "w5",
"model_sha": "1f3078160da415bda29a65e6c854f938c291d38166d0cb6e89cec2fd81678613"
}
],
"model_sha": {
"1f3078160da415bda29a65e6c854f938c291d38166d0cb6e89cec2fd81678613": {
"modelType": "0",
"_doc_modelType": " nn:0 | approximation:1 | classification:2 | forecasting:3 | image_classification:4 | text_classification:5 | text_generation:6 | auto_association:7 | autoencoder:8 | ae_classifier:9 |",
"layersSizes": "5,16,8,3",
"_doc_layersSizes": "List of postive integers [L0, L1, ..., LN]",
"layerTypesList": "1,3,3,3",
"_doc_LayerTypes": " Default:0 | Scaling:1 | CNN:2 | Perceptron:3 | Pooling:4 | Probabilistic:5 | LSTM:6 | Reccurrent:7 | Unscaling:8 | Bounding:9 |",
"layers_functions": "1,7,7,11",
"_doc_layers_functions_activation": " Threshold:1 | Sign:2 | Logistic:3 | Tanh:4 | Linear:5 | ReLU:6 | eLU:7 | SeLU:8 | Soft-plus:9 | Soft-sign:10 | Hard-sigmoid:11 |",
"_doc_layer_functions_pooling": " none:1 | Max:2 | Avg:3 |",
"_doc_layer_functions_probabilistic": " Binary:1 | Logistic:2 | Competitive:3 | Softmax:4 |",
"_doc_layer_functions_scaler": " none:1 | MinMax:2 | MeanStd:3 | STD:4 | Log:5 |",
"lossMethod": "2",
"_doc_lossMethod": " SSE:1 | MSE:2 | NSE:3 | MinkowskiE:4 | WSE:5 | CEE:6 |",
"lr": "0.01",
"_doc_lr": "Positve float",
"epochs": "1",
"_doc_epochs": "Positve Integer",
"optimizer": "5",
"_doc_optimizer": " GD:0 | CGD:1 | SGD:2 | QuasiNeuton:3 | LVM:4 | ADAM:5 |",
"optimizerArgs": "none",
"_doc_optimizerArgs": "String",
"infraType": "0",
"_doc_infraType": " opennn:0 | wolfengine:1 |",
"distributedSystemType": "0",
"_doc_distributedSystemType": " none:0 | fedClientAvg:1 | fedServerAvg:2 |",
"distributedSystemArgs": "none",
"_doc_distributedSystemArgs": "String",
"distributedSystemToken": "none",
"_doc_distributedSystemToken": "Token that associates distributed group of workers and parameter-server"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"experimentName": "synthetic_3_gausians",
"batchSize": 100,
"csvFilePath": "/tmp/nerlnet/data/NerlnetData-master/nerlnet/synthetic/synthetic_full.csv",
"numOfFeatures": "5",
"numOfLabels": "3",
"headersNames": "Norm(0:1),Norm(4:1),Norm(10:3)",
"Phases":
[
{
"phaseName": "training_phase",
"phaseType": "training",
"sourcePieces":
[
{
"sourceName": "s1",
"startingSample": "0",
"numOfBatches": "200",
"workers": "w1,w2"
},
{
"sourceName": "s2",
"startingSample": "20000",
"numOfBatches": "200",
"workers": "w3,w4"
},
{
"sourceName": "s3",
"startingSample": "40000",
"numOfBatches": "200",
"workers": "w5,w1,w2,w3,w4"
}
]
},
{
"phaseName": "prediction_phase",
"phaseType": "prediction",
"sourcePieces":
[
{
"sourceName": "s1",
"startingSample": "40000",
"numOfBatches": "300",
"workers": "w1,w2,w3,w4"
},
{
"sourceName": "s2",
"startingSample": "40000",
"numOfBatches": "300",
"workers": "w1,w2,w3,w4,w5"
},
{
"sourceName": "s3",
"startingSample": "40000",
"numOfBatches": "300",
"workers": "w5"
}
]
}
]
}

2 changes: 1 addition & 1 deletion src_py/nerlPlanner/Definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
NERLNET_SPLASH_LOGO_PATH = NERL_PLANNER_PATH+"/Nerlnet_splash_logo.png"
WINDOW_TITLE = "NerlPlanner"
WINDOW_FIXED_WIDTH = 1500
WINDOW_MAX_SUPPORTED_HEIGHT = 1060 # smaller than 1080 is better
WINDOW_MAX_SUPPORTED_HEIGHT = 1070 # smaller than 1080 is better
WINDOW_HEIGHT_MULTIPLICATION_FACTOR = 5/6

WIN_EXPERIMENT_FLOW_DIALOG_EVENT_KEY = 'WIN_EXPERIMENT_FLOW_DIALOG'
Expand Down
2 changes: 1 addition & 1 deletion src_py/nerlPlanner/WinWorkerDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def ui_update_all_values(WorkerWindow):
if DistributedSystemType == "none":
DistributedSystemToken = "none"
# Update here when adding new fields to the worker
worker_parameters_conditions = bool(LayersSizesList) and bool(ModelTypeStr) and bool(ModelType) and\
worker_parameters_conditions = bool(LayersSizesList) and bool(ModelTypeStr) and (ModelType >= 0) and\
bool(OptimizationType) and bool(LossMethodStr) and bool(LossMethod) and\
bool(LearningRate) and bool(LayersFunctionsList) and bool(LayersSizesList) and bool(Epochs) and bool(InfraType) and\
bool(DistributedSystemType) and bool(DistributedSystemToken)
Expand Down
4 changes: 2 additions & 2 deletions tests/inputJsonsFiles/dc_test_synt_1d_2c_1s_4r_4w.json.noip
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
"_doc_modelType": " nn:0 | approximation:1 | classification:2 | forecasting:3 | image-classification:4 | text-classification:5 | text-generation:6 | auto-association:7 | autoencoder:8 | ae-classifier:9 |",
"layersSizes": "5,16,8,3",
"_doc_layersSizes": "List of postive integers [L0, L1, ..., LN]",
"layerTypesList": "1,3,3,3,3",
"layerTypesList": "1,3,3,3",
"_doc_LayerTypes": " Default:0 | Scaling:1 | CNN:2 | Perceptron:3 | Pooling:4 | Probabilistic:5 | LSTM:6 | Reccurrent:7 | Unscaling:8 |",
"layers_functions": "1,7,7,7,11",
"layers_functions": "1,7,7,11",
"_doc_layers_functions_activation": " Threshold:1 | Sign:2 | Logistic:3 | Tanh:4 | Linear:5 | ReLU:6 | eLU:7 | SeLU:8 | Soft-plus:9 | Soft-sign:10 | Hard-sigmoid:11 |",
"_doc_layer_functions_pooling": " none:1 | Max:2 | Avg:3 |",
"_doc_layer_functions_probabilistic": " Binary:1 | Logistic:2 | Competitive:3 | Softmax:4 |",
Expand Down

0 comments on commit 690101f

Please sign in to comment.