@aws/ml-container-creator 1.0.4 → 1.1.0
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.
- package/README.md +9 -0
- package/bin/cli.js +57 -0
- package/config/agent.json +16 -0
- package/package.json +4 -1
- package/pyproject.toml +3 -0
- package/servers/agent-knowledge/index.js +592 -0
- package/servers/agent-knowledge/package.json +15 -0
- package/src/agent/__init__.py +2 -0
- package/src/agent/__pycache__/__init__.cpython-312.pyc +0 -0
- package/src/agent/__pycache__/config_loader.cpython-312.pyc +0 -0
- package/src/agent/__pycache__/context.cpython-312.pyc +0 -0
- package/src/agent/__pycache__/health_check.cpython-312.pyc +0 -0
- package/src/agent/agent.py +513 -0
- package/src/agent/config_loader.py +215 -0
- package/src/agent/context.py +380 -0
- package/src/agent/data/capability-matrix.json +106 -0
- package/src/agent/health_check.py +341 -0
- package/src/agent/prompts/system.md +173 -0
- package/src/agent/requirements-agent.txt +3 -0
- package/src/lib/generated/cli-options.js +1 -1
- package/src/lib/generated/parameter-matrix.js +1 -1
- package/src/lib/generated/validation-rules.js +1 -1
- package/src/lib/tune-config-state.js +89 -68
- package/templates/do/config +6 -1
- package/src/lib/auto-prompt-builder.js +0 -172
- package/src/lib/cli-handler.js +0 -529
- package/src/lib/community-reports-validator.js +0 -91
- package/src/lib/configuration-exporter.js +0 -204
- package/src/lib/dataset-slug.js +0 -152
- package/src/lib/docker-introspection-validator.js +0 -51
- package/src/lib/known-flags-validator.js +0 -200
- package/src/lib/schema-validator.js +0 -157
- package/src/lib/train-config-parser.js +0 -136
- package/src/lib/train-config-persistence.js +0 -143
- package/src/lib/train-config-validator.js +0 -112
- package/src/lib/train-feedback.js +0 -46
- package/src/lib/train-idempotency.js +0 -97
- package/src/lib/train-request-builder.js +0 -120
- package/src/lib/tune-dataset-validator.js +0 -279
- package/src/lib/tune-output-resolver.js +0 -66
package/README.md
CHANGED
|
@@ -74,6 +74,14 @@ ml-container-creator my-model \
|
|
|
74
74
|
./do/test # Test the endpoint
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
### Get help from the advisor
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
ml-container-creator hey # Conversational AI advisor (powered by Bedrock)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Ask questions about your project, get optimization recommendations, troubleshoot issues, and plan workflows. See [Agent docs](https://awslabs.github.io/ml-container-creator/agent/) for details.
|
|
84
|
+
|
|
77
85
|
## Documentation
|
|
78
86
|
|
|
79
87
|
Full documentation is available at [awslabs.github.io/ml-container-creator](https://awslabs.github.io/ml-container-creator/).
|
|
@@ -83,6 +91,7 @@ Full documentation is available at [awslabs.github.io/ml-container-creator](http
|
|
|
83
91
|
- [Deployment Guide](https://awslabs.github.io/ml-container-creator/deployments/) — All deployment targets and lifecycle scripts
|
|
84
92
|
- [CI Integration](https://awslabs.github.io/ml-container-creator/ci-integration/) — Automated lifecycle testing for all deployment configurations
|
|
85
93
|
- [Examples](https://awslabs.github.io/ml-container-creator/EXAMPLES/) — Framework-specific walkthroughs
|
|
94
|
+
- [Advisory Agent](https://awslabs.github.io/ml-container-creator/agent/) — Conversational AI advisor (`ml-container-creator hey`)
|
|
86
95
|
- [Troubleshooting](https://awslabs.github.io/ml-container-creator/TROUBLESHOOTING/) — Common issues and solutions
|
|
87
96
|
|
|
88
97
|
## Prerequisites
|
package/bin/cli.js
CHANGED
|
@@ -4,10 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import { createRequire } from 'module';
|
|
6
6
|
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { spawn, execSync } from 'child_process';
|
|
7
9
|
import { program, Option, Help } from 'commander';
|
|
8
10
|
import { run } from '../src/app.js';
|
|
9
11
|
import { cliOptions, helpGroups } from '../src/lib/generated/cli-options.js';
|
|
10
12
|
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = path.dirname(__filename);
|
|
15
|
+
|
|
11
16
|
const require = createRequire(import.meta.url);
|
|
12
17
|
const { version } = require('../package.json');
|
|
13
18
|
|
|
@@ -314,4 +319,56 @@ program
|
|
|
314
319
|
}
|
|
315
320
|
});
|
|
316
321
|
|
|
322
|
+
program
|
|
323
|
+
.command('hey')
|
|
324
|
+
.description('Chat with the ml-container-creator advisor')
|
|
325
|
+
.option('--project-dir <dir>', 'Project directory to analyze', process.cwd())
|
|
326
|
+
.option('-o, --offline', 'Static reference mode (no Bedrock calls)')
|
|
327
|
+
.action(async (options) => {
|
|
328
|
+
// 1. Check python3 is available
|
|
329
|
+
try {
|
|
330
|
+
execSync('python3 --version', { stdio: 'ignore' });
|
|
331
|
+
} catch {
|
|
332
|
+
console.error('❌ python3 not found. Install Python 3.10+ to use the advisor.');
|
|
333
|
+
console.error(' macOS: brew install python3');
|
|
334
|
+
console.error(' Ubuntu: sudo apt install python3');
|
|
335
|
+
process.exit(1);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// 2. If not offline, check strands-agents is installed
|
|
339
|
+
if (!options.offline) {
|
|
340
|
+
try {
|
|
341
|
+
execSync('python3 -c "import strands"', { stdio: 'ignore' });
|
|
342
|
+
} catch {
|
|
343
|
+
console.error('❌ strands-agents not installed. Run:');
|
|
344
|
+
console.error(' pip install -r src/agent/requirements-agent.txt');
|
|
345
|
+
process.exit(1);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// 3. Resolve agent script path
|
|
350
|
+
const agentScript = path.join(__dirname, '..', 'src', 'agent', 'agent.py');
|
|
351
|
+
|
|
352
|
+
// 4. Build args and spawn
|
|
353
|
+
const args = [agentScript, '--project-dir', options.projectDir];
|
|
354
|
+
if (options.offline) {
|
|
355
|
+
args.push('--offline');
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const child = spawn('python3', args, {
|
|
359
|
+
stdio: 'inherit',
|
|
360
|
+
env: { ...process.env, PYTHONUNBUFFERED: '1' }
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
// 5. Forward exit code
|
|
364
|
+
child.on('close', (code) => {
|
|
365
|
+
process.exit(code ?? 0);
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
child.on('error', (err) => {
|
|
369
|
+
console.error(`❌ Failed to start agent: ${err.message}`);
|
|
370
|
+
process.exit(1);
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
|
|
317
374
|
program.parse();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelId": "global.anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
3
|
+
"mcpServers": [
|
|
4
|
+
"instance-sizer",
|
|
5
|
+
"base-image-picker",
|
|
6
|
+
"model-picker",
|
|
7
|
+
"workload-picker",
|
|
8
|
+
"e2e-status",
|
|
9
|
+
"agent-knowledge"
|
|
10
|
+
],
|
|
11
|
+
"inputCostPer1k": 0.003,
|
|
12
|
+
"outputCostPer1k": 0.015,
|
|
13
|
+
"exitCommands": ["exit", "quit", "bye", "q"],
|
|
14
|
+
"reloadCommands": ["reload"],
|
|
15
|
+
"mcpServerTimeout": 30
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/ml-container-creator",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Build and deploy custom ML containers on AWS SageMaker with minimal configuration.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
"servers/workload-picker/index.js",
|
|
52
52
|
"servers/workload-picker/manifest.json",
|
|
53
53
|
"servers/workload-picker/package.json",
|
|
54
|
+
"servers/agent-knowledge/index.js",
|
|
55
|
+
"servers/agent-knowledge/package.json",
|
|
54
56
|
"servers/lib/bedrock-client.js",
|
|
55
57
|
"servers/lib/custom-validators.js",
|
|
56
58
|
"servers/lib/dynamic-resolver.js",
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
"config/bootstrap-stack.json",
|
|
62
64
|
"config/bootstrap-e2e-stack.json",
|
|
63
65
|
"config/parameter-schema-v2.json",
|
|
66
|
+
"config/agent.json",
|
|
64
67
|
"config/tune-catalog.json",
|
|
65
68
|
"config/presets/",
|
|
66
69
|
"infra/ci-harness/bin/",
|