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

Add CI tests and CompatHelper #16

Merged
merged 5 commits into from
Apr 5, 2021
Merged

Add CI tests and CompatHelper #16

merged 5 commits into from
Apr 5, 2021

Conversation

devmotion
Copy link
Member

In addition to this PR, one has to add a SSH deploy key (e.g., by following the instructions here: https://github.com/JuliaRegistries/CompatHelper.jl#122-instructions-for-setting-up-the-ssh-deploy-key) to allow CompatHelper to trigger the CI tests.

@codecov
Copy link

codecov bot commented Apr 2, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@6b954e6). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #16   +/-   ##
=======================================
  Coverage        ?   81.03%           
=======================================
  Files           ?        1           
  Lines           ?       58           
  Branches        ?        0           
=======================================
  Hits            ?       47           
  Misses          ?       11           
  Partials        ?        0           

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 6b954e6...6c51fc4. Read the comment docs.

@phipsgabler
Copy link
Member

LGTM as far as I can judge, but I'm not really familiar with GitHub workflows. I have added the deploy key, can you check if it works correctly?

@devmotion
Copy link
Member Author

Unfortunately, I don't think it's possible to check it - we have to wait until CompatHelper runs or trigger it manually once the action is available in the default branch.

@phipsgabler phipsgabler merged commit b7a2e48 into main Apr 5, 2021
@phipsgabler phipsgabler deleted the dw/ci branch April 5, 2021 12:48
bors bot pushed a commit that referenced this pull request Feb 7, 2022
This is a draft PR introducing a `Model` type that stores and makes use the model graph. 

The main type introduced here is the `Model` struct which stores the `ModelState` and `DAG`, each of which are their own types. `ModelState` contains information about the node values, dependencies and eval functions and `DAG` contains the graph and topologically ordered vertex list. 

A model can be constructed in the following way: 

```julia
julia> nt = (
               s2 = (0.0, (), () -> InverseGamma(2.0,3.0), :Stochastic), 
               μ = (1.0, (), () -> 1.0, :Logical), 
               y = (0.0, (:μ, :s2), (μ, s2) -> MvNormal(μ, sqrt(s2)), :Stochastic)
           )
(s2 = (0.0, (), var"#33#36"(), :Stochastic), μ = (1.0, (), var"#34#37"(), :Logical), y = (0.0, (:μ, :s2), var"#35#38"(), :Stochastic))

julia> Model(nt)
Nodes: 
μ = (value = 1.0, input = (), eval = var"#16#19"(), kind = :Logical)
s2 = (value = 0.0, input = (), eval = var"#15#18"(), kind = :Stochastic)
y = (value = 0.0, input = (:μ, :s2), eval = var"#17#20"(), kind = :Stochastic)
DAG: 
3×3 SparseMatrixCSC{Float64, Int64} with 2 stored entries:
  ⋅    ⋅    ⋅ 
  ⋅    ⋅    ⋅ 
 1.0  1.0   ⋅ 
```

At present, only functions needed for the constructors are implemented, as well as indexing using `@varname`. I still need to complete the integration with the AbstractPPL api. TODO: 
~~- [ ] `condition`/`decondition`,~~
~~- [ ] `sample`~~
~~- [ ] `logdensityof`~~
- [x] pure functions for ordered dictionary, as outlined in [AbstractPPL](https://github.com/TuringLang/AbstractPPL.jl#property-interface)

Feedback on `Model` structure welcome whilst I implement the remaining features!
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