Skip to content

ALEC-305: Remove the Ludwig deep-learning engine - #166

Merged
joseanesONMS merged 4 commits into
release-3.xfrom
ja/alec-305-remove-ludwig
Jul 27, 2026
Merged

ALEC-305: Remove the Ludwig deep-learning engine#166
joseanesONMS merged 4 commits into
release-3.xfrom
ja/alec-305-remove-ludwig

Conversation

@joseanesONMS

Copy link
Copy Markdown
Contributor

Tracked by ALEC-305.

Ludwig is retired. ALEC now offers exactly two correlation engines: DBSCAN clustering and the LLM-based clustering engine. This removes the TensorFlow/Ludwig-trained deep-learning engine and the standalone cluster engine (the UI's mislabeled "Deep Learning" option).

Removed

  • Modules: engine/deeplearning + features/deeplearning (incl. ludwig_model.yaml and the bundled TensorFlow model saved_model.pb), and the now-orphaned wrap/tensorflow.
  • Concrete cluster engine: ClusterEngine / ClusterEngineFactory. engine/cluster keeps AbstractClusterEngine and the graph/spatial infra that DBSCAN and the LLM engine extend.
  • Wiring: Maven modules/deps (7 poms), Karaf features (alec-engine-deeplearning, alec-features-deeplearning, alec-dependency-tensorflow) and their inclusion in alec-opennms-standalone; the deeplearning/cluster branches in EngineRestImpl, EngineParameterImpl, ProcessAlarms; smoke-test parameters; the UI's ENGINE_DEEP_LEARNING constant and DeepLearning icon/label; and the orphaned tensorflow/json-simple/httpclient/string-similarity pom entries.

The UI's engine-status widget now shows CLUSTERING for DBSCAN and LLM for the LLM engine. AccountSettings already offered only DBSCAN/LLM, so no selector was orphaned.

Docs

  • Removed the Ludwig deep-learning page and all references.
  • Added a dedicated LLM Clustering Engine (experimental) reference page + nav entry, and clarified throughout that the LLM clustering engine (correlation — forms situations) is distinct from LLM Root Cause Analysis (explanation — describes a formed situation). The two share the LLM Setup but are enabled independently. Verified the Root Cause Analysis page is accurate against the current feature.

Verification

  • mvn clean install — compile across all modules, features.xml resolution, and KAR assembly all succeed (BUILD SUCCESS), which validates the Karaf feature graph has no dangling references to the removed bundles.
  • vue-tsc clean; 86 UI tests green; ui-ext bundle rebuilt (no "DEEP LEARNING" strings remain).

Given this touches the Karaf feature graph, I recommend a smoke deploy (ALEC boots and registers with only DBSCAN + LLM) before merge — happy to run it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UB6PGc2rpPbojnqbTHU5ND

joseanesONMS and others added 2 commits July 15, 2026 17:11
…uster engine)

ALEC now offers exactly two correlation engines: DBSCAN clustering and the
LLM-based clustering engine. The TensorFlow/Ludwig-trained deep-learning
engine and the standalone 'cluster' engine (the UI's mislabeled 'Deep
Learning' option) are removed.

Removed:
- engine/deeplearning and features/deeplearning modules (incl. ludwig_model.yaml
  and the bundled TensorFlow model), plus the now-orphaned wrap/tensorflow module.
- The concrete ClusterEngine / ClusterEngineFactory (engine/cluster keeps
  AbstractClusterEngine and the graph/spatial infrastructure that DBSCAN and
  the LLM engine extend).
- All wiring: Maven modules/deps, Karaf features (alec-engine-deeplearning,
  alec-features-deeplearning, alec-dependency-tensorflow) and their inclusion in
  alec-opennms-standalone; the deeplearning/cluster cases in EngineRestImpl,
  EngineParameterImpl and ProcessAlarms; smoke-test parameters; the UI's
  ENGINE_DEEP_LEARNING constant and the DeepLearning icon/label (ConfigurationInfo
  now shows CLUSTERING for DBSCAN and LLM for the LLM engine); and the orphaned
  tensorflow/json-simple/httpclient/string-similarity pom entries.

Docs:
- Removed the Ludwig deep-learning engine page and references.
- Added a dedicated 'LLM Clustering Engine (experimental)' reference page and
  nav entry, and clarified throughout that the LLM *clustering* engine
  (correlation) is distinct from LLM *Root Cause Analysis* (explanation) — the
  two share the LLM Setup but are enabled independently.

Verified: mvn clean install (compile + features.xml resolution + KAR assembly)
BUILD SUCCESS; vue-tsc clean; 86 UI tests green; ui-ext bundle rebuilt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UB6PGc2rpPbojnqbTHU5ND
…CorrrelationTest

Same chronic testcontainers startup flake seen on #165 (unrelated to this
engine-removal change; the other 4 CircleCI jobs are green). Re-running.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@joseanesONMS
joseanesONMS requested a review from cgorantla July 16, 2026 13:50
@joseanesONMS

Copy link
Copy Markdown
Contributor Author

@cgorantla — friendly re-ping on this one too. ALEC-305: remove the Ludwig deep-learning engine, leaving DBSCAN + LLM as the only correlation engines (per the decision that Ludwig is retired). AbstractClusterEngine and the graph/spatial infra stay; only the concrete ClusterEngine/ClusterEngineFactory and the whole deeplearning/tensorflow stack are removed.

  • mvn clean install green (compile + features.xml resolution + KAR assembly); the meaningful CircleCI stages pass (only the pre-existing distributed-container smoke flake is red).
  • Built and deployed to a local OpenNMS: ALEC boots and registers with only DBSCAN + LLM — no deeplearning/tensorflow bundles in the KAR or the running system.
  • Docs updated: removed the Ludwig page and added a dedicated LLM Clustering Engine page, clarifying that LLM clustering (correlation) is distinct from LLM Root Cause Analysis (explanation).

This and #168 (the ALEC-301 LLM engine fixes, just verified live) are the last two open in the series — a review on both when you have a moment would let them land. Thanks!

…r test

DistributedRedundantCorrrelationTest.canCorrelateAlarmsAfterFailure failed
with testcontainers ContainerLaunchException (container startup timeout), not
a regression from the Ludwig removal — all build stages passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@joseanesONMS

Copy link
Copy Markdown
Contributor Author

@cgorantla friendly re-ping — this one's ready for review. ALEC-305: remove the Ludwig deep-learning engine, leaving DBSCAN + LLM as the only correlation engines.

The earlier smoke-test-commit failure was the known flaky DistributedRedundantCorrrelationTest.canCorrelateAlarmsAfterFailure (testcontainers ContainerLaunchException — container startup timeout), not a regression: every build stage passed. I've pushed an empty commit to re-run CI. Would appreciate your review when you have a moment.

… the removed cluster engine

Removing the standalone ClusterEngineFactory left the smoke tests deploying
`alec-engine-cluster`, which now only carries the AbstractClusterEngine base
and registers no EngineFactory OSGi service. alec-driver-main then fails to
resolve (missing (objectClass=EngineFactory)), ALEC never starts in the
container, and the test times out as a testcontainers ContainerLaunchException
— which read like the chronic infra flake but was a deterministic regression.

Deploy DBSCAN instead (it pulls in the same cluster base infra and registers a
real EngineFactory), matching what DistributedStandaloneCorrelationTest already
uses:
- DistributedRedundantCorrrelationTest / DistributedUDLTest: supplier "cluster" -> "dbscan"
- sentinel-overlay-redundant boot: hardcoded alec-engine-cluster -> the
  %ALEC_ENGINE_FEATURE% placeholder, so the supplier actually drives it
  (consistent with sentinel-overlay-standalone)
- opennms-integrated-overlay boot (no placeholder substitution): alec-engine-cluster
  -> alec-engine-dbscan, so IntegratedCorrelationTest/IntegratedUDLTest don't
  break smoke-test-full on develop after merge

OnCommitSmokeTestSuite (DistributedRedundantCorrrelationTest only) now resolves
an EngineFactory and boots ALEC.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@joseanesONMS

Copy link
Copy Markdown
Contributor Author

Fixed the smoke failure in 61af07a0 — and it turned out not to be the chronic infra flake, but a real regression from this PR.

Root cause: removing the standalone ClusterEngineFactory left the smoke tests still deploying alec-engine-cluster, which now carries only AbstractClusterEngine and registers no EngineFactory OSGi service. So alec-driver-main couldn't resolve:

Unable to resolve org.opennms.alec.driver.main:
  missing requirement osgi.service; filter:="(objectClass=…EngineFactory)"

ALEC never started in the Sentinel container, so the test timed out as a testcontainers ContainerLaunchException — which looks identical to the infra flake but was deterministic (failed every run on this branch; #168's smoke, which keeps the cluster engine, passed).

Fix: deploy DBSCAN instead (same cluster base infra, real EngineFactory), matching what DistributedStandaloneCorrelationTest already does:

  • DistributedRedundantCorrrelationTest / DistributedUDLTest: engine supplier "cluster""dbscan"
  • sentinel-overlay-redundant boot: hardcoded alec-engine-cluster → the %ALEC_ENGINE_FEATURE% placeholder (so the supplier drives it, like the standalone overlay)
  • opennms-integrated-overlay boot: alec-engine-clusteralec-engine-dbscan, so IntegratedCorrelationTest/IntegratedUDLTest don't break smoke-test-full on develop post-merge

smoke-test compiles; the on-commit suite (DistributedRedundantCorrrelationTest) now resolves an EngineFactory and boots ALEC.

@joseanesONMS

Copy link
Copy Markdown
Contributor Author

@cgorantla re-ping — this one pairs with #169 to finally get smoke-test-full green.

#169 fixes the distributed smoke OOM + OIA-version-skew (red since March). The last remaining full-suite failure is DistributedStandalone[deeplearning] (the TensorFlow engine timing out on model load) — which this PR removes, since ALEC-305 drops the deeplearning engine and reduces DistributedStandalone to {dbscan}. So #166 + #169 together = green full smoke.

On its own gate (smoke-test-commit = DistributedRedundant only), #166's DBSCAN fix already resolves it. Ready for your review.

@cgorantla cgorantla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joseanesONMS
joseanesONMS merged commit d7b0253 into release-3.x Jul 27, 2026
4 of 6 checks passed
@joseanesONMS
joseanesONMS deleted the ja/alec-305-remove-ludwig branch July 27, 2026 17:09
joseanesONMS added a commit that referenced this pull request Aug 12, 2026
Merge release-3.x into develop: unify smoke-test fixes (#166 + #169)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants