-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add interface point for specifying acceleration
in a composite models
#762
Conversation
move acceleration out of CompositeFitresult into Machine
Codecov Report
@@ Coverage Diff @@
## dev #762 +/- ##
==========================================
+ Coverage 85.80% 85.81% +0.01%
==========================================
Files 36 36
Lines 3438 3441 +3
==========================================
+ Hits 2950 2953 +3
Misses 488 488
Continue to review full report at Codecov.
|
@ablaom Thanks, I've had a look at the PR, it's a bit different from what I expected. I originaly thought you would just add it as a model hyperparameter and pass the What would be the use case for a non-composite model? it seems to create multiple entrypoints for acceleration which I find a bit confusing. |
Not really, but I understand the confusion. I am frequently confusing the machine that wraps a composite model and concrete data (which has no "downstream" machines, because it's arguments are just The main reason for adding |
It is added as a hyperparameter. The parameter could be passed on using |
I think the advantage is that you don't have to overburden the Machine with a new field that is only relevant for the Surrogate which is itself an artefact of Composition. I am quite confident it would work too since I have made similar thing here to prioritize the Composite's acceleration specification. |
I agree, that having that the |
This PR:
Stack
sAn alternative approach with a different interface point for acceleration is provided by #759 .
Supposing the composite model struct has
acceleration::AbstractResource
as a hyper-parameter, one simply addsacceleration=acceleration
in the learning network machine constructor. Here's an example:To support resources other than
CPU1()
, requires new overloadings offit!(::Node, acceleration; kwargs)
as shown here forCPUThreads
. In a separate draft branch, I have done just that, and successfully tested aStack
.TODO:
fit!(::Node)
andfit!(:Machine{<:Surrogate}
andfit!(::Machine)
.acceleration=CPUThreads()
inStack
throws expected unsupported acceleration error.