CRZbulabula opened a new pull request, #17719: URL: https://github.com/apache/iotdb/pull/17719
## Why `org.apache.iotdb.ainode.it` runs every push/PR on a single self-hosted GPU runner with `max-parallel: 1`. Two pain points: 1. Every test class triggers another 1C1D1A boot + a per-fork copy of the multi-GB built-in LTSM weights, even when the test only checks metadata. 2. A few non-GPU tests (SHOW MODELS, DROP builtin model error, REMOVE AINODE) sit behind the same scarce GPU resource as CALL INFERENCE / FORECAST. ## What **Two-tier isolation** - **`AIClusterIT`** (existing, GPU): tests that drive inference, forecast, or `LOAD MODEL TO DEVICES`. Stays on the GPU runner via `cluster-it-1c1d1a.yml`. - **`AINodeIT`** (new, CPU): metadata/lifecycle-only tests. Runs on `ubuntu-latest` via the new `cluster-it-ainode-cpu.yml` workflow and `-PAINodeIT` Maven profile. Tests moved to `AINodeIT`: | Class | Tests | | --- | --- | | `AINodeBasicIT` (new) | `showBuiltInModelTestInTree/Table`, `dropBuiltInModelErrorTestInTree/Table` | | `AINodeClusterConfigIT` (re-tagged) | `aiNodeRegisterAndRemoveTest` | `AINodeSharedClusterIT` keeps the 11 GPU-bound tests; `AINodeConcurrentForecastIT` stays on GPU as a concurrency smoke check. **Per-fork startup cost** `AINodeWrapper.start()` previously walked `/data/ainode/models` and copied every weight file into the per-fork node directory. Now it: - Symlinks the cache root into the node directory (read-only weights are safe to share across forks). - Falls back to a copy on filesystems that reject symlinks. - Tolerates a missing cache directory entirely, so CPU runners that don't pre-stage weights can still boot AINode for metadata tests. **Smaller wins on the GPU pipeline** - `AINodeConcurrentForecastIT.concurrentGPUForecastTest`: `loop = 100 → 10` (still 100 reqs/model — enough for a concurrency smoke check; daily/nightly can dial it back up if regressions appear). - `AINodeTestUtils.prepareDataInTree/Table/Table2` and `AINodeConcurrentForecastIT.prepareDataForTableModel`: per-row `Statement.execute()` → `addBatch()` / `executeBatch()` in chunks of 500. The two 5760-row preps in `AINodeSharedClusterIT.setUp()` are the hot path. ## Tested - `mvn spotless:apply -pl integration-test -P with-integration-tests` - `mvn test-compile -pl integration-test -P with-integration-tests` — BUILD SUCCESS (793 sources) - The GPU workflow (`cluster-it-1c1d1a.yml`) is unchanged in shape — same Maven invocation, same profile, just fewer test classes. - The new CPU workflow mirrors `cluster-it-1c1d.yml`'s setup (Java 17, Maven cache, `somaxconn`). ## Notes / blocked features - The CPU workflow still builds `iotdb-core/ainode` (PyInstaller). On `ubuntu-latest` the build runs against `~/.cache/iotdb-ainode-build` cache key, which is per-runner; first run after worker recycle will be slow until we add `actions/cache` for it. That's intentionally left out of this PR — separate change. - `AINodeBasicIT` and `AINodeClusterConfigIT` each still spin up their own 1C1D1A on the CPU runner. Further consolidation is possible but `AINodeClusterConfigIT.REMOVE AINODE` mutates cluster state and is awkward to share. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
