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

Introduce interface point for RNGs #164

Closed
wants to merge 11 commits into from
Closed

Introduce interface point for RNGs #164

wants to merge 11 commits into from

Conversation

ablaom
Copy link
Collaborator

@ablaom ablaom commented Jun 15, 2021

Addresses #160 .

Should not be merged until:

on which this is based.

The new build signatures are changed from build(model, n_in, n_out)/build(model, n_in, n_out, n_channels) to

build(model, rng, n_in, n_out) -> chain
build(model, rng, n_in, n_out, n_channels) -> chain

This is breaking. I had thought to keep backwards compatibility with a fallback

build(model, rng::AbstractRNG, shape...) = build(model, shape...)

but this doesn't work unless all newbuild methods have rng explicitly typed in the signature, which is annoying (otherwise there is method ambiguity).

@ablaom ablaom marked this pull request as draft June 15, 2021 23:17
@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2021

Codecov Report

Merging #164 (efa210e) into dev (eb90873) will decrease coverage by 2.64%.
The diff coverage is 95.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #164      +/-   ##
==========================================
- Coverage   91.32%   88.67%   -2.65%     
==========================================
  Files           6        8       +2     
  Lines         265      212      -53     
==========================================
- Hits          242      188      -54     
- Misses         23       24       +1     
Impacted Files Coverage Δ
src/builders.jl 55.55% <55.55%> (ø)
src/classifier.jl 100.00% <100.00%> (ø)
src/common.jl 96.55% <100.00%> (+4.88%) ⬆️
src/core.jl 90.27% <100.00%> (+2.77%) ⬆️
src/image.jl 100.00% <100.00%> (ø)
src/regressor.jl 100.00% <100.00%> (ø)
src/types.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb90873...efa210e. Read the comment docs.

@ablaom ablaom marked this pull request as ready for review June 18, 2021 04:17
@ablaom ablaom marked this pull request as draft June 18, 2021 04:20
@ablaom
Copy link
Collaborator Author

ablaom commented Jun 18, 2021

Closing in favour of #166

@ablaom ablaom closed this Jun 18, 2021
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