-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(scheduler): account for number of model instances when scheduling #6183
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ import ( | |
"google.golang.org/protobuf/proto" | ||
|
||
"github.com/seldonio/seldon-core/apis/go/v2/mlops/agent" | ||
"github.com/seldonio/seldon-core/apis/go/v2/mlops/scheduler" | ||
|
||
"github.com/seldonio/seldon-core/scheduler/v2/pkg/agent/interfaces" | ||
) | ||
|
@@ -54,11 +55,13 @@ func isReady(service interfaces.DependencyServiceInterface, logger *log.Entry, m | |
return backoff.RetryNotify(readyToError, backoffWithMax, logFailure) | ||
} | ||
|
||
func getModifiedModelVersion(modelId string, version uint32, originalModelVersion *agent.ModelVersion, modelRuntimeInfo *agent.ModelRuntimeInfo) *agent.ModelVersion { | ||
func getModifiedModelVersion(modelId string, version uint32, originalModelVersion *agent.ModelVersion, modelRuntimeInfo *scheduler.ModelRuntimeInfo) *agent.ModelVersion { | ||
mv := proto.Clone(originalModelVersion) | ||
mv.(*agent.ModelVersion).Model.Meta.Name = modelId | ||
if mv.(*agent.ModelVersion).Model.ModelSpec != nil && modelRuntimeInfo != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can Maybe add a note as readers could think that runtime info can be set while model spec is nil? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it can be in practice, but there are some tests where it's not set. I can change this so it's always set. |
||
mv.(*agent.ModelVersion).Model.ModelSpec.ModelRuntimeInfo = modelRuntimeInfo | ||
} | ||
mv.(*agent.ModelVersion).Version = version | ||
mv.(*agent.ModelVersion).RuntimeInfo = modelRuntimeInfo | ||
return mv.(*agent.ModelVersion) | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is... the model runtime info param in
getModifiedModelVersion
is nil.