Skip to content

Draft: Replacing pytorch dependency with scikit-learn

This code change replaces a custom PyTorch-based machine learning implementation with scikit-learn, a more standard and simpler machine learning library.

The main changes include:

  • Removing PyTorch dependencies and replacing them with scikit-learn equivalents
  • Converting a custom AutoEncoder neural network to use IsolationForest for anomaly detection (finding unusual patterns in data)
  • Replacing a custom SimpleNN neural network with MLPRegressor for prediction tasks
  • Simplifying the training and prediction code by removing manual neural network training loops and using scikit-learn's built-in methods
  • Fixing some regex patterns that had incorrect escaping

The overall functionality remains the same - the system still analyzes Jenkins build data to detect anomalies and predict migration complexity - but now uses more standard, maintainable tools. This change makes the code easier to understand, debug, and maintain while reducing external dependencies. The scikit-learn library provides the same machine learning capabilities but with simpler, more reliable implementations that don't require manual neural network management.

Merge request reports

Loading