Skip to content

Improve logging, error messages and minor bug fixes - #6135

Open
zhaoqizqwang wants to merge 11 commits into
aws:master-nova-follow-upsfrom
zhaoqizqwang:zhaoqi-nova-fix
Open

Improve logging, error messages and minor bug fixes#6135
zhaoqizqwang wants to merge 11 commits into
aws:master-nova-follow-upsfrom
zhaoqizqwang:zhaoqi-nova-fix

Conversation

@zhaoqizqwang

Copy link
Copy Markdown
Collaborator

see details in commit messages:

  • Cache sagemaker_session in BaseTrainer.init to avoid creating
    duplicate sessions on every method call
  • Remove redundant role validation (was validating 3x per train() call),
    now validates once in ModelTrainer.init
  • Demote noisy INFO logs to DEBUG (role validated, stopping condition
    defaults, recipe paths, output compression)
  • Add num_lines param to stream_logs() to limit output for long jobs
  • Prefix CloudWatch log lines with [CloudWatch] and use print() to
    distinguish container output from SDK logging
  • Improve show_metrics() error message when time range yields no logs
  • Raise ValueError on AccessDenied in dry_run data path validation
    instead of silently warning
  • Improve model_package_group error message to mention compute option
  • Move local imports in _train_serverful_smtj to top-level
  • Remove redundant get_role() call in ModelTrainer.from_recipe()

…ing training jobs

Use resourcegroupstaggingapi.get_resources() for O(1) tag lookups instead
of scanning all models/endpoints, and auto-resolve string _latest_training_job
to TrainingJob objects in ModelBuilder so trainers work without manual .get().
- Cache sagemaker_session in BaseTrainer.__init__ to avoid creating
  duplicate sessions on every method call
- Remove redundant role validation (was validating 3x per train() call),
  now validates once in ModelTrainer.__init__
- Demote noisy INFO logs to DEBUG (role validated, stopping condition
  defaults, recipe paths, output compression)
- Add num_lines param to stream_logs() to limit output for long jobs
- Prefix CloudWatch log lines with [CloudWatch] and use print() to
  distinguish container output from SDK logging
- Improve show_metrics() error message when time range yields no logs
- Raise ValueError on AccessDenied in dry_run data path validation
  instead of silently warning
- Improve model_package_group error message to mention compute option
- Move local imports in _train_serverful_smtj to top-level
- Remove redundant get_role() call in ModelTrainer.from_recipe()
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.

1 participant