KOSASIH / Galactic-Chain

Assert statement used outside of tests BAN-B101
Security
Major
4 months ago4 months old
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
13    swarm_learning = SwarmLearning(X, y)
14    swarm_learning.train()
15    accuracy = swarm_learning.evaluate(X, y)
16    assert accuracy >= 0.5, "The accuracy of the model is low"17
18if __name__ == '__main__':
19    test_swarm_learning()
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
12
13    quantum_ai = QuantumAI(X, y)
14    accuracy = quantum_ai.evaluate(X, y)
15    assert accuracy >= 0.5, "The accuracy of the model is low"16
17if __name__ == '__main__':
18    test_quantum_ai()
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
12
13    federated_learning = FederatedLearning(X, y)
14    accuracy = federated_learning.train()
15    assert accuracy >= 0.5, "The accuracy of the model is low"16
17if __name__ == '__main__':
18    test_federated_learning()
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
13    edge_ai = EdgeAI(X, y)
14    edge_ai.train()
15    accuracy = edge_ai.evaluate(X, y)
16    assert accuracy >= 0.5, "The accuracy of the model is low"17
18if __name__ == '__main__':
19    test_edge_ai()
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
13    automl = AutoML(X, y)
14    automl.train()
15    accuracy = automl.evaluate(X, y)
16    assert accuracy >= 0.5, "The accuracy of the model is low"17
18if __name__ == '__main__':
19    test_automl()