Skip to content
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

Refactors minMaxWorkers from ModelInfo to WorkerPool #30

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

zachgk
Copy link
Contributor

@zachgk zachgk commented Oct 28, 2021

This removes some of the data from the ModelInfo to the wlm. Specifically, it
moves tracking of the min and max number of workers.

It also starts turning the wlm.WorkerPool into a public representation of the
management of a single model while the main wlm has all models. As part of this,
some functionality is moved from the main wlm to the pool. In general, we should
eventually not have part of the API be wlm.doSomething(model, ...) and some of
it be wlm.model(model).doSomething(...). I favor the latter approach.

Lastly, this also removes the concept of updating the model and then triggering
model changed. I noticed the change only really affects the scaleModel, so it is
simpler to just move those effects under scaleModel directly.

This removes some of the data from the ModelInfo to the wlm. Specifically, it
moves tracking of the min and max number of workers.

It also starts turning the wlm.WorkerPool into a public representation of the
management of a single model while the main wlm has all models. As part of this,
some functionality is moved from the main wlm to the pool. In general, we should
eventually not have part of the API be wlm.doSomething(model, ...) and some of
it be wlm.model(model).doSomething(...). I favor the latter approach.

Lastly, this also removes the concept of updating the model and then triggering
model changed. I noticed the change only really affects the scaleModel, so it is
simpler to just move those effects under scaleModel directly.
@zachgk zachgk requested a review from frankfliu October 28, 2021 17:51
@zachgk zachgk merged commit 0a22819 into deepjavalibrary:master Nov 1, 2021
@zachgk zachgk deleted the wpWorkers branch November 1, 2021 17:08
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