@elizaos/training 2.0.0-alpha.76 → 2.0.0-alpha.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/package.json +2 -2
  2. package/.turbo/turbo-lint.log +0 -3
  3. package/.turbo/turbo-typecheck.log +0 -1
  4. package/dist/.tsbuildinfo +0 -1
  5. package/dist/adapter.js +0 -59
  6. package/dist/archetypes/ArchetypeConfigService.js +0 -510
  7. package/dist/archetypes/derive-archetype.js +0 -196
  8. package/dist/archetypes/index.js +0 -7
  9. package/dist/benchmark/ArchetypeMatchupBenchmark.js +0 -547
  10. package/dist/benchmark/BenchmarkChartGenerator.js +0 -632
  11. package/dist/benchmark/BenchmarkDataGenerator.js +0 -825
  12. package/dist/benchmark/BenchmarkDataViewer.js +0 -197
  13. package/dist/benchmark/BenchmarkHistoryService.js +0 -135
  14. package/dist/benchmark/BenchmarkRunner.js +0 -483
  15. package/dist/benchmark/BenchmarkValidator.js +0 -158
  16. package/dist/benchmark/FastEvalRunner.js +0 -133
  17. package/dist/benchmark/MetricsValidator.js +0 -104
  18. package/dist/benchmark/MetricsVisualizer.js +0 -775
  19. package/dist/benchmark/ModelBenchmarkService.js +0 -433
  20. package/dist/benchmark/ModelRegistry.js +0 -122
  21. package/dist/benchmark/RulerBenchmarkIntegration.js +0 -168
  22. package/dist/benchmark/SimulationA2AInterface.js +0 -683
  23. package/dist/benchmark/SimulationEngine.js +0 -522
  24. package/dist/benchmark/TaskRunner.js +0 -60
  25. package/dist/benchmark/__tests__/BenchmarkRunner.test.js +0 -409
  26. package/dist/benchmark/__tests__/HeadToHead.test.js +0 -105
  27. package/dist/benchmark/index.js +0 -23
  28. package/dist/benchmark/parseSimulationMetrics.js +0 -86
  29. package/dist/benchmark/simulation-types.js +0 -1
  30. package/dist/dependencies.js +0 -197
  31. package/dist/generation/TrajectoryGenerator.js +0 -244
  32. package/dist/generation/index.js +0 -6
  33. package/dist/huggingface/HuggingFaceDatasetUploader.js +0 -463
  34. package/dist/huggingface/HuggingFaceIntegrationService.js +0 -272
  35. package/dist/huggingface/HuggingFaceModelUploader.js +0 -385
  36. package/dist/huggingface/index.js +0 -9
  37. package/dist/huggingface/shared/HuggingFaceUploadUtil.js +0 -144
  38. package/dist/index.js +0 -41
  39. package/dist/init-training.js +0 -43
  40. package/dist/metrics/TrajectoryMetricsExtractor.js +0 -523
  41. package/dist/metrics/__tests__/TrajectoryMetricsExtractor.test.js +0 -628
  42. package/dist/metrics/index.js +0 -7
  43. package/dist/metrics/types.js +0 -21
  44. package/dist/rubrics/__tests__/index.test.js +0 -150
  45. package/dist/rubrics/ass-kisser.js +0 -83
  46. package/dist/rubrics/degen.js +0 -78
  47. package/dist/rubrics/goody-twoshoes.js +0 -82
  48. package/dist/rubrics/index.js +0 -184
  49. package/dist/rubrics/information-trader.js +0 -82
  50. package/dist/rubrics/infosec.js +0 -99
  51. package/dist/rubrics/liar.js +0 -102
  52. package/dist/rubrics/perps-trader.js +0 -85
  53. package/dist/rubrics/researcher.js +0 -79
  54. package/dist/rubrics/scammer.js +0 -80
  55. package/dist/rubrics/social-butterfly.js +0 -71
  56. package/dist/rubrics/super-predictor.js +0 -95
  57. package/dist/rubrics/trader.js +0 -65
  58. package/dist/scoring/ArchetypeScoringService.js +0 -301
  59. package/dist/scoring/JudgePromptBuilder.js +0 -401
  60. package/dist/scoring/LLMJudgeCache.js +0 -263
  61. package/dist/scoring/index.js +0 -8
  62. package/dist/training/AutomationPipeline.js +0 -714
  63. package/dist/training/BenchmarkService.js +0 -370
  64. package/dist/training/ConfigValidator.js +0 -153
  65. package/dist/training/MarketOutcomesTracker.js +0 -142
  66. package/dist/training/ModelDeployer.js +0 -128
  67. package/dist/training/ModelFetcher.js +0 -48
  68. package/dist/training/ModelSelectionService.js +0 -248
  69. package/dist/training/ModelUsageVerifier.js +0 -106
  70. package/dist/training/MultiModelOrchestrator.js +0 -349
  71. package/dist/training/RLModelConfig.js +0 -295
  72. package/dist/training/RewardBackpropagationService.js +0 -117
  73. package/dist/training/RulerScoringService.js +0 -450
  74. package/dist/training/TrainingMonitor.js +0 -108
  75. package/dist/training/TrajectoryRecorder.js +0 -281
  76. package/dist/training/__tests__/TrajectoryRecorder.test.js +0 -363
  77. package/dist/training/index.js +0 -30
  78. package/dist/training/logRLConfig.js +0 -29
  79. package/dist/training/pipeline.js +0 -80
  80. package/dist/training/storage/ModelStorageService.js +0 -190
  81. package/dist/training/storage/TrainingDataArchiver.js +0 -136
  82. package/dist/training/storage/index.js +0 -7
  83. package/dist/training/types.js +0 -6
  84. package/dist/training/window-utils.js +0 -100
  85. package/dist/utils/index.js +0 -73
  86. package/dist/utils/logger.js +0 -55
  87. package/dist/utils/snowflake.js +0 -15
  88. package/dist/utils/synthetic-detector.js +0 -67
  89. package/vitest.config.ts +0 -8
@@ -1,15 +0,0 @@
1
- /**
2
- * Snowflake ID Generator
3
- *
4
- * Generates unique IDs for training package entities.
5
- * Uses a simple timestamp-based approach.
6
- */
7
- let counter = 0;
8
- export async function generateSnowflakeId() {
9
- const timestamp = Date.now();
10
- const currentCounter = counter++;
11
- if (counter > 999)
12
- counter = 0;
13
- // Format: timestamp (13 digits) + counter (3 digits)
14
- return `${timestamp}${currentCounter.toString().padStart(3, "0")}`;
15
- }
@@ -1,67 +0,0 @@
1
- /**
2
- * Training Data Validator
3
- *
4
- * Validates that training data contains real LLM calls.
5
- * No synthetic pattern detection needed - we simply don't generate synthetic data.
6
- */
7
- /**
8
- * Validate that trajectory steps contain real LLM calls.
9
- *
10
- * Training data MUST have actual LLM calls with real prompts and responses.
11
- *
12
- * @returns Object with validation result and details
13
- */
14
- export function validateLLMCalls(steps) {
15
- const issues = [];
16
- let stepsWithLLM = 0;
17
- let totalLLMCalls = 0;
18
- for (let i = 0; i < steps.length; i++) {
19
- const step = steps[i];
20
- const llmCalls = step?.llmCalls ?? step?.llm_calls ?? [];
21
- if (llmCalls.length === 0) {
22
- continue;
23
- }
24
- stepsWithLLM++;
25
- for (let j = 0; j < llmCalls.length; j++) {
26
- const call = llmCalls[j];
27
- if (!call)
28
- continue;
29
- totalLLMCalls++;
30
- // Validate LLM call has actual content
31
- const systemPrompt = call.systemPrompt ?? call.system_prompt ?? "";
32
- const userPrompt = call.userPrompt ?? call.user_prompt ?? "";
33
- const response = call.response ?? "";
34
- if (systemPrompt.length < 10) {
35
- issues.push(`Step ${i}, call ${j}: Missing or empty system prompt`);
36
- }
37
- if (userPrompt.length < 10) {
38
- issues.push(`Step ${i}, call ${j}: Missing or empty user prompt`);
39
- }
40
- if (response.length < 5) {
41
- issues.push(`Step ${i}, call ${j}: Missing or empty response`);
42
- }
43
- }
44
- }
45
- // At least 3 steps should have LLM calls for valid training data
46
- if (stepsWithLLM < 3) {
47
- issues.push(`Only ${stepsWithLLM}/${steps.length} steps have LLM calls (minimum: 3)`);
48
- }
49
- return {
50
- valid: issues.length === 0,
51
- totalSteps: steps.length,
52
- stepsWithLLM,
53
- totalLLMCalls,
54
- issues,
55
- };
56
- }
57
- /**
58
- * Assert that trajectory steps contain real LLM calls.
59
- * Throws an error if validation fails.
60
- */
61
- export function assertHasLLMCalls(steps, trajectoryId) {
62
- const validation = validateLLMCalls(steps);
63
- if (!validation.valid) {
64
- throw new Error(`Trajectory ${trajectoryId} failed LLM validation: ${validation.issues.join("; ")}. ` +
65
- "Training data must contain real LLM calls.");
66
- }
67
- }
package/vitest.config.ts DELETED
@@ -1,8 +0,0 @@
1
- import { defineConfig } from "vitest/config";
2
-
3
- export default defineConfig({
4
- test: {
5
- include: ["src/**/*.test.ts"],
6
- exclude: ["dist/**", "node_modules/**"],
7
- },
8
- });