feat(BA-1416): make resource fragmentation configurable #4533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #4478 (BA-1416).

This PR introduces new parameter
allow_fractional_resource_fragmentation
, on session creation API'sresource_opts
input. If the value is not specified on creation API request, it will fall back to to default value as specified on the target scaling group'sscheduler_opts.allow_fractional_resource_fragmentation
value, which eventually defaults astrue
.Setting this as the (ultimate) default
true
will continue to work as before - allowing fragmentation of AI resources defined as fractional (e.g.cuda.shares
). Specifying this asfalse
will block the fragmentation withFractionalResourceFragmented
error (see screenshot below).Testing this PR requires a Backend.AI cluster with two or more accelerators with fractional scaling enabled. If you do not have access to such hardware, using mock accelerator will be also sufficient.
Checklist: (if applicable)
📚 Documentation preview 📚: https://sorna--4533.org.readthedocs.build/en/4533/
📚 Documentation preview 📚: https://sorna-ko--4533.org.readthedocs.build/ko/4533/