From d6bccb784f63a28c030d86261a531e358962d023 Mon Sep 17 00:00:00 2001 From: leondavi Date: Sat, 11 Nov 2023 01:56:52 +0200 Subject: [PATCH] [TESTS] change dir --- {Tests => tests}/NerlnetFullFlowTest.sh | 2 +- {Tests => tests}/NerlnetNifTest.sh | 0 .../accuracy_stats_synt_1d_2c_4r_4w.json | 0 .../arch_test_synt_1d_2c_1s_4r_4w.json | 159 ++++++++++++++++++ .../arch_test_synt_1d_2c_1s_4r_4w.json.noip | 0 .../conn_test_synt_1d_2c_1s_4r_4w.json | 0 .../dc_test_synt_1d_2c_1s_4r_4w.json | 106 ++++++++++++ .../exp_test_synt_1d_2c_1s_4r_4w.json | 0 {Tests => tests}/set_env.sh | 0 9 files changed, 266 insertions(+), 1 deletion(-) rename {Tests => tests}/NerlnetFullFlowTest.sh (98%) rename {Tests => tests}/NerlnetNifTest.sh (100%) rename {Tests => tests}/inputJsonsFiles/accuracy_stats_synt_1d_2c_4r_4w.json (100%) create mode 100755 tests/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json rename {Tests => tests}/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json.noip (100%) rename {Tests => tests}/inputJsonsFiles/conn_test_synt_1d_2c_1s_4r_4w.json (100%) create mode 100644 tests/inputJsonsFiles/dc_test_synt_1d_2c_1s_4r_4w.json rename {Tests => tests}/inputJsonsFiles/exp_test_synt_1d_2c_1s_4r_4w.json (100%) rename {Tests => tests}/set_env.sh (100%) diff --git a/Tests/NerlnetFullFlowTest.sh b/tests/NerlnetFullFlowTest.sh similarity index 98% rename from Tests/NerlnetFullFlowTest.sh rename to tests/NerlnetFullFlowTest.sh index e1fb16fa..3ad6b2c1 100755 --- a/Tests/NerlnetFullFlowTest.sh +++ b/tests/NerlnetFullFlowTest.sh @@ -1,7 +1,7 @@ #!/bin/bash export NERLNET_PATH="/usr/local/lib/nerlnet-lib/NErlNet" -export TESTS_PATH="$NERLNET_PATH/Tests" +export TESTS_PATH="$NERLNET_PATH/tests" export NERLNET_RUNNING_TIMEOUT_SEC="30" NERLNET_CONFIG_DIR=$NERLNET_PATH/config diff --git a/Tests/NerlnetNifTest.sh b/tests/NerlnetNifTest.sh similarity index 100% rename from Tests/NerlnetNifTest.sh rename to tests/NerlnetNifTest.sh diff --git a/Tests/inputJsonsFiles/accuracy_stats_synt_1d_2c_4r_4w.json b/tests/inputJsonsFiles/accuracy_stats_synt_1d_2c_4r_4w.json similarity index 100% rename from Tests/inputJsonsFiles/accuracy_stats_synt_1d_2c_4r_4w.json rename to tests/inputJsonsFiles/accuracy_stats_synt_1d_2c_4r_4w.json diff --git a/tests/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json b/tests/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json new file mode 100755 index 00000000..1dfe5236 --- /dev/null +++ b/tests/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json @@ -0,0 +1,159 @@ +{ + "NerlNetSettings": + { + "frequency": "60", + "batchSize": "50" + }, + "devices": [ + { + "host": "10.211.55.3", + "entities": "mainServer,c1,c2,s1,r1,r2,r3,r4,apiServer" + } + ], + "apiServer": + { + "host": "10.211.55.3", + "port": "8095", + "args": "" + } + , + "nerlGUI": + { + "host": "10.211.55.3", + "port": "8096", + "args": "" + } + , + "mainServer": + { + "host": "10.211.55.3", + "port": "8080", + "args": "" + } + , + "workers": [ + { + "name": "w1", + "modelId": "1", + "_comment0": "E_APPROXIMATION = 1, E_CLASSIFICATION = 2, E_FORECASTING = 3 , E_NCODER_DECODER = 4, E_CUSTOMNN = 5, E_AE = 6, E_AEC = 7", + "modelType": "5", + "scalingType_comment1": "Non-Scaling = 1 , MinimumMaximum = 2 , MeanStandardDeviation = 3 , StandardDeviation = 4 , Logarithm = 5", + "scalingMethod": "1", + "_commnet_layer_type": "E_LAYER_TYPE_DEFAULT(perceptron) = 0, E_LAYER_TYPE_SCALING = 1, E_LAYER_TYPE_CONVOLUTIONAL = 2 , E_LAYER_TYPE_PERCEPTRON = 3 , E_LAYER_TYPE_POOLING = 4 , E_LAYER_TYPE_PROBABILISTIC = 5 , E_LAYER_TYPE_LSTM = 6 , E_LAYER_TYPE_RECURRENT = 7 , E_LAYER_TYPE_UNSCALING = 8 , E_LAYER_TYPE_BOUNDING = 9 ", + "layerTypesList": "[4,1,1,1,0,0,0]", + "layersSizes": "[4,1,1,5,10,5,3]", + "_comment2": "Activation functions explain: Threshold = 1, SymmetricThreshold = 2 ,Logistic = 3 ,HyperbolicTangent = 4 ,Linear = 5,RectifiedLinear = 6 ,ExponentialLinear = 7 ,ScaledExponentialLinear = 8 ,SoftPlus = 9 ,SoftSign = 10 ,HardSigmoid = 11", + "layersActivationFunctions": "[4,1,1,6,6,11,11]", + "federatedMode": "0", + "countLimit": "10", + "_comment4": "LOSS: SUM_SQUARED_ERROR = 1, MSE = 2 /* MSE - Mean Squared Error */, E_LOSS_METHOD_NSE = 3 /* NSE - Normalized Squared Error */, MINKOWSKI_ERROR = 4, WSE = 5 /* WSE - Weighted Squared Error */, CEE = 6 /* CEE - Cross Entropy Error */", + "lossMethod": "2", + "_comment5": "TODOTODO explain learningRate", + "learningRate": "0.01", + "_comment3": "OptimizerExplain: 0- NONE, 1- SGD, 2- MINI_BATCH_SGD, 3- MOMENTUM, 4- NAG, 5- ADAGRAD, 6- ADAM", + "optimizer":"6" + }, + { + "name": "w2", + "modelId": "1", + "_comment0": "E_APPROXIMATION = 1, E_CLASSIFICATION = 2, E_FORECASTING = 3 , E_NCODER_DECODER = 4, E_CUSTOMNN = 5, E_AE = 6, E_AEC = 7", + "modelType": "5", + "scalingType_comment1": "Non-Scaling = 1 , MinimumMaximum = 2 , MeanStandardDeviation = 3 , StandardDeviation = 4 , Logarithm = 5", + "scalingMethod": "1", + "_commnet_layer_type": "E_LAYER_TYPE_DEFAULT(perceptron) = 0, E_LAYER_TYPE_SCALING = 1, E_LAYER_TYPE_CONVOLUTIONAL = 2 , E_LAYER_TYPE_PERCEPTRON = 3 , E_LAYER_TYPE_POOLING = 4 , E_LAYER_TYPE_PROBABILISTIC = 5 , E_LAYER_TYPE_LSTM = 6 , E_LAYER_TYPE_RECURRENT = 7 , E_LAYER_TYPE_UNSCALING = 8 , E_LAYER_TYPE_BOUNDING = 9 ", + "layerTypesList": "[4,1,1,1,0,0,0]", + "layersSizes": "[4,1,1,5,10,5,3]", + "_comment2": "Activation functions explain: Threshold = 1, SymmetricThreshold = 2 ,Logistic = 3 ,HyperbolicTangent = 4 ,Linear = 5,RectifiedLinear = 6 ,ExponentialLinear = 7 ,ScaledExponentialLinear = 8 ,SoftPlus = 9 ,SoftSign = 10 ,HardSigmoid = 11", + "layersActivationFunctions": "[4,1,1,6,6,11,11]", + "federatedMode": "0", + "countLimit": "10", + "_comment4": "LOSS: SUM_SQUARED_ERROR = 1, MSE = 2 /* MSE - Mean Squared Error */, E_LOSS_METHOD_NSE = 3 /* NSE - Normalized Squared Error */, MINKOWSKI_ERROR = 4, WSE = 5 /* WSE - Weighted Squared Error */, CEE = 6 /* CEE - Cross Entropy Error */", + "lossMethod": "2", + "_comment5": "TODOTODO explain learningRate", + "learningRate": "0.01", + "_comment3": "OptimizerExplain: 0- NONE, 1- SGD, 2- MINI_BATCH_SGD, 3- MOMENTUM, 4- NAG, 5- ADAGRAD, 6- ADAM", + "optimizer":"6" + }, + { + "name": "w3", + "modelId": "1", + "_comment0": "E_APPROXIMATION = 1, E_CLASSIFICATION = 2, E_FORECASTING = 3 , E_NCODER_DECODER = 4, E_CUSTOMNN = 5, E_AE = 6, E_AEC = 7", + "modelType": "5", + "scalingType_comment1": "Non-Scaling = 1 , MinimumMaximum = 2 , MeanStandardDeviation = 3 , StandardDeviation = 4 , Logarithm = 5", + "scalingMethod": "1", + "_commnet_layer_type": "E_LAYER_TYPE_DEFAULT(perceptron) = 0, E_LAYER_TYPE_SCALING = 1, E_LAYER_TYPE_CONVOLUTIONAL = 2 , E_LAYER_TYPE_PERCEPTRON = 3 , E_LAYER_TYPE_POOLING = 4 , E_LAYER_TYPE_PROBABILISTIC = 5 , E_LAYER_TYPE_LSTM = 6 , E_LAYER_TYPE_RECURRENT = 7 , E_LAYER_TYPE_UNSCALING = 8 , E_LAYER_TYPE_BOUNDING = 9 ", + "layerTypesList": "[4,1,1,1,0,0,0]", + "layersSizes": "[4,1,1,5,10,5,3]", + "_comment2": "Activation functions explain: Threshold = 1, SymmetricThreshold = 2 ,Logistic = 3 ,HyperbolicTangent = 4 ,Linear = 5,RectifiedLinear = 6 ,ExponentialLinear = 7 ,ScaledExponentialLinear = 8 ,SoftPlus = 9 ,SoftSign = 10 ,HardSigmoid = 11", + "layersActivationFunctions": "[4,1,1,6,6,11,11]", + "federatedMode": "0", + "countLimit": "10", + "_comment4": "LOSS: SUM_SQUARED_ERROR = 1, MSE = 2 /* MSE - Mean Squared Error */, E_LOSS_METHOD_NSE = 3 /* NSE - Normalized Squared Error */, MINKOWSKI_ERROR = 4, WSE = 5 /* WSE - Weighted Squared Error */, CEE = 6 /* CEE - Cross Entropy Error */", + "lossMethod": "2", + "_comment5": "TODOTODO explain learningRate", + "learningRate": "0.01", + "_comment3": "OptimizerExplain: 0- NONE, 1- SGD, 2- MINI_BATCH_SGD, 3- MOMENTUM, 4- NAG, 5- ADAGRAD, 6- ADAM", + "optimizer":"6" + }, + { + "name": "w4", + "modelId": "1", + "_comment0": "E_APPROXIMATION = 1, E_CLASSIFICATION = 2, E_FORECASTING = 3 , E_NCODER_DECODER = 4, E_CUSTOMNN = 5, E_AE = 6, E_AEC = 7", + "modelType": "5", + "scalingType_comment1": "Non-Scaling = 1 , MinimumMaximum = 2 , MeanStandardDeviation = 3 , StandardDeviation = 4 , Logarithm = 5", + "scalingMethod": "1", + "_commnet_layer_type": "E_LAYER_TYPE_DEFAULT(perceptron) = 0, E_LAYER_TYPE_SCALING = 1, E_LAYER_TYPE_CONVOLUTIONAL = 2 , E_LAYER_TYPE_PERCEPTRON = 3 , E_LAYER_TYPE_POOLING = 4 , E_LAYER_TYPE_PROBABILISTIC = 5 , E_LAYER_TYPE_LSTM = 6 , E_LAYER_TYPE_RECURRENT = 7 , E_LAYER_TYPE_UNSCALING = 8 , E_LAYER_TYPE_BOUNDING = 9 ", + "layerTypesList": "[4,1,1,1,0,0,0]", + "layersSizes": "[4,1,1,5,10,5,3]", + "_comment2": "Activation functions explain: Threshold = 1, SymmetricThreshold = 2 ,Logistic = 3 ,HyperbolicTangent = 4 ,Linear = 5,RectifiedLinear = 6 ,ExponentialLinear = 7 ,ScaledExponentialLinear = 8 ,SoftPlus = 9 ,SoftSign = 10 ,HardSigmoid = 11", + "layersActivationFunctions": "[4,1,1,6,6,11,11]", + "federatedMode": "0", + "countLimit": "10", + "_comment4": "LOSS: SUM_SQUARED_ERROR = 1, MSE = 2 /* MSE - Mean Squared Error */, E_LOSS_METHOD_NSE = 3 /* NSE - Normalized Squared Error */, MINKOWSKI_ERROR = 4, WSE = 5 /* WSE - Weighted Squared Error */, CEE = 6 /* CEE - Cross Entropy Error */", + "lossMethod": "2", + "_comment5": "TODOTODO explain learningRate", + "learningRate": "0.01", + "_comment3": "OptimizerExplain: 0- NONE, 1- SGD, 2- MINI_BATCH_SGD, 3- MOMENTUM, 4- NAG, 5- ADAGRAD, 6- ADAM", + "optimizer":"6" + } + ], + "clients": [ + { + "name": "c1", + "port": "18091", + "workers": "w1,w2" + }, + { + "name": "c2", + "port": "18092", + "workers": "w3,w4" + } + ], + "sources": [ + { + "name": "s1", + "port": "8091", + "method": "1", + "epochs": 1, + "COMMENTS": "method allowed: '1': sends each exapme to all clients listed, '2': round robin between all clients" + } + ], + "routers": [ + { + "name": "r1", + "port": "18084" + }, + { + "name": "r2", + "port": "18085" + }, + { + "name": "r3", + "port": "18086" + }, + { + "name": "r4", + "port": "18087" + } + ] +} diff --git a/Tests/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json.noip b/tests/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json.noip similarity index 100% rename from Tests/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json.noip rename to tests/inputJsonsFiles/arch_test_synt_1d_2c_1s_4r_4w.json.noip diff --git a/Tests/inputJsonsFiles/conn_test_synt_1d_2c_1s_4r_4w.json b/tests/inputJsonsFiles/conn_test_synt_1d_2c_1s_4r_4w.json similarity index 100% rename from Tests/inputJsonsFiles/conn_test_synt_1d_2c_1s_4r_4w.json rename to tests/inputJsonsFiles/conn_test_synt_1d_2c_1s_4r_4w.json diff --git a/tests/inputJsonsFiles/dc_test_synt_1d_2c_1s_4r_4w.json b/tests/inputJsonsFiles/dc_test_synt_1d_2c_1s_4r_4w.json new file mode 100644 index 00000000..1a75cb00 --- /dev/null +++ b/tests/inputJsonsFiles/dc_test_synt_1d_2c_1s_4r_4w.json @@ -0,0 +1,106 @@ +{ + "NerlNetSettings": { + "frequency": "60", + "batchSize": "50" + }, + "mainServer": { + "port": "8095", + "args": "" + }, + "apiServer": { + "port": "8080", + "args": "" + }, + "devices": [ + { + "name": "pc", + "ipv4": "10.211.55.3", + "entities": "mainServer,apiServer" + } + ], + "routers": [ + { + "name": "r1", + "port": "18084", + "policy": "0" + }, + { + "name": "r2", + "port": "18085", + "policy": "0" + }, + { + "name": "r3", + "port": "18086", + "policy": "0" + }, + { + "name": "r4", + "port": "18087", + "policy": "0" + } + ], + "sources": [ + { + "name": "s1", + "port": "8091", + "frequency": "60", + "policy": "0", + "epochs": "1", + "type": "0" + } + ], + "clients": [ + { + "name": "c1", + "port": "18091", + "workers": "w1,w2" + }, + { + "name": "c2", + "port": "18092", + "workers": "w3,w4" + } + ], + "workers": [ + { + "name": "w1", + "model-sha": "5396cc8dbd1407c408021a16bb4e014e780de95cdf62680c19cac81139ad791c" + }, + { + "name": "w2", + "model-sha": "5396cc8dbd1407c408021a16bb4e014e780de95cdf62680c19cac81139ad791c" + }, + { + "name": "w3", + "model-sha": "5396cc8dbd1407c408021a16bb4e014e780de95cdf62680c19cac81139ad791c" + }, + { + "name": "w4", + "model-sha": "5396cc8dbd1407c408021a16bb4e014e780de95cdf62680c19cac81139ad791c" + } + ], + "model-sha": { + "5396cc8dbd1407c408021a16bb4e014e780de95cdf62680c19cac81139ad791c": { + "modelType": "5", + "_doc_modelType": " approximation:1 | classification:2 | forecasting:3 | encoder_decoder:4 | nn:5 | autoencoder:6 | ae-classifier:7 | fed-client:8 | fed-server:9 |", + "layersSizes": "5,10,5,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,6,11,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 | Minkowski-E:4 | WSE:5 | CEE:6 |", + "lr": "0.01", + "_doc_lr": "Positve float", + "epochs": "1", + "_doc_epochs": "Positve Integer", + "optimizer": "6", + "_doc_optimizer": " none:0 | SGD:1 | Mini-Batch:2 | Momentum:3 | NAG:4 | Adagrad:5 | ADAM:6 |" + } + } +} \ No newline at end of file diff --git a/Tests/inputJsonsFiles/exp_test_synt_1d_2c_1s_4r_4w.json b/tests/inputJsonsFiles/exp_test_synt_1d_2c_1s_4r_4w.json similarity index 100% rename from Tests/inputJsonsFiles/exp_test_synt_1d_2c_1s_4r_4w.json rename to tests/inputJsonsFiles/exp_test_synt_1d_2c_1s_4r_4w.json diff --git a/Tests/set_env.sh b/tests/set_env.sh similarity index 100% rename from Tests/set_env.sh rename to tests/set_env.sh