Skip to content

feat(SDK): warn instead of raising for unvetted instance types on studio start - #140

Merged
justusschock merged 2 commits into
mainfrom
justus/instance-type-validation-warning-0a9f4c
Aug 31, 2026
Merged

feat(SDK): warn instead of raising for unvetted instance types on studio start#140
justusschock merged 2 commits into
mainfrom
justus/instance-type-validation-warning-0a9f4c

Conversation

@justusschock

Copy link
Copy Markdown
Member

What does this PR do?

Allows submitting any instance type to Studio.start() again. The client-side NotSupportedError raised when the requested machine isn't in the cloud account's known accelerator list is replaced with a UserWarning stating the machine is a custom instance type that hasn't been vetted by Lightning and that startup may fail — continue at your own risk.

Details

  • Machine.from_str already falls back to constructing an ad-hoc Machine for unrecognized strings, so custom types flow through end-to-end.
  • The machine_has_capacity check only fails for known machines explicitly marked out of capacity, so it doesn't block custom types either.
  • NotSupportedError stays in lightning_sdk.exceptions for backwards compatibility (nothing else referenced it).
  • test_studio_start is parametrized over supported/unsupported machines, asserting the unsupported case warns but still starts.

🤖 Generated with Claude Code

…dio start

Replace the NotSupportedError raised when a requested machine is not in
the cloud account's known accelerator list with a UserWarning, so any
instance type can be submitted. Unknown types are treated as custom
instance types that haven't been vetted by Lightning — continue at your
own risk.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
websocket-client types ws.recv() as str | bytes; decode bytes to str
before handing messages to the log parsers to satisfy mypy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@justusschock
justusschock merged commit a29b6f9 into main Aug 31, 2026
25 checks passed
@justusschock
justusschock deleted the justus/instance-type-validation-warning-0a9f4c branch August 31, 2026 13:03
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