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

Migration to Tractables #138

Merged
merged 11 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 48 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,56 @@
name: Unit Tests

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
name: Unit Tests
on:
push:
branches: [master]
tags: ["*"]
pull_request:
workflow_dispatch:


permissions:
actions: write
contents: read
env:
DATADEPS_ALWAYS_ACCEPT: 1
JIVE_PROCS: 1

jobs:
build:
runs-on: ubuntu-20.04

test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- '1'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:

- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: 1.7

# Runs a single command using the runners shell
- name: Unit Tests
run: |
julia --project --check-bounds=yes --depwarn=yes -e 'import Pkg; Pkg.test(; coverage=true)'

- name: Codecov Upload
run: |
julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder());'

version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@latest
- run: |
sudo apt-get -qq update
sudo apt install -y pdf2svg texlive-latex-base texlive-binaries texlive-pictures texlive-latex-extra texlive-luatex
luatex -v
pdflatex -v
- uses: julia-actions/julia-docdeploy@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
13 changes: 8 additions & 5 deletions .github/workflows/compathelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@ name: CompatHelper
on:
schedule:
- cron: '0 0 */7 * *'

workflow_dispatch:


permissions:
contents: write
pull-requests: write

jobs:
CompatHelper:
runs-on: ubuntu-latest

steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'

- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}

run: julia -e 'using CompatHelper; CompatHelper.main()'
5 changes: 4 additions & 1 deletion .github/workflows/tagbot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: TagBot
on:
issue_comment: # THIS BIT IS NEW
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
Expand Down
8 changes: 5 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ProbabilisticCircuits"
uuid = "2396afbe-23d7-11ea-1e05-f1aa98e17a44"
authors = ["Guy Van den Broeck <[email protected]>"]
version = "0.4.1"
version = "0.5.0"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand All @@ -16,8 +16,8 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
TikzGraphs = "b4f28e30-c73f-5eaf-a395-8a9db949a742"

[compat]
CUDA = "3.8.1, 4"
ChowLiuTrees = "0.1.1"
CUDA = "3.8.1, 4, 5"
ChowLiuTrees = "0.2"
CodecZlib = "0.7"
DirectedAcyclicGraphs = "0.1.3, 0.2"
Graphs = "1"
Expand All @@ -26,3 +26,5 @@ MetaGraphs = "0.7"
SpecialFunctions = "2.1"
TikzGraphs = "1.3"
julia = "1.6"
Random = "1"

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# Probabilistic<wbr>Circuits<wbr>.jl

[![Unit Tests](https://github.com/Juice-jl/ProbabilisticCircuits.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Juice-jl/ProbabilisticCircuits.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster) [![codecov](https://codecov.io/gh/Juice-jl/ProbabilisticCircuits.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/Juice-jl/ProbabilisticCircuits.jl) [![](https://img.shields.io/badge/docs-stable-green.svg)](https://juice-jl.github.io/ProbabilisticCircuits.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://juice-jl.github.io/ProbabilisticCircuits.jl/dev)
[![Unit Tests](https://github.com/Tractables/ProbabilisticCircuits.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Tractables/ProbabilisticCircuits.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster) [![codecov](https://codecov.io/gh/Tractables/ProbabilisticCircuits.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/Tractables/ProbabilisticCircuits.jl) [![](https://img.shields.io/badge/docs-stable-green.svg)](https://Tractables.github.io/ProbabilisticCircuits.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://Tractables.github.io/ProbabilisticCircuits.jl/dev)

This package provides functionalities for learning/constructing probabilistic circuits and using them to compute various probabilistic queries. It is part of the [Juice package](https://github.com/Juice-jl) (Julia Circuit Empanada).
This package provides functionalities for learning/constructing probabilistic circuits and using them to compute various probabilistic queries. It is part of the [Juice package](https://github.com/Tractables) (Julia Circuit Empanada).

## Testing

Expand Down
8 changes: 4 additions & 4 deletions README_DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Follow these instructions to install and use ProbabilisticCircuits.jl as a devel

Install the Julia package in development mode by running

julia -e 'using Pkg; Pkg.develop(PackageSpec(url="https://github.com/Juice-jl/ProbabilisticCircuits.jl.git"))'
julia -e 'using Pkg; Pkg.develop(PackageSpec(url="https://github.com/Tractables/ProbabilisticCircuits.jl.git"))'

By default this will install the package at `~/.julia/dev` and allow you to change the code there. See the [Pkg manual](https://julialang.github.io/Pkg.jl/v1/managing-packages/#Developing-packages-1) for more details. One can adjust the development directory using environment variables or simply create a symbolic link to/from your favorite development directory.


Depending on your usecase you might also want to have `LogicCircuits.jl` in develop mode, in that case run the following to do both:

julia -e 'using Pkg; Pkg.develop([PackageSpec(url="https://github.com/Juice-jl/LogicCircuits.jl.git"),PackageSpec(url="https://github.com/Juice-jl/ProbabilisticCircuits.jl.git")])'
julia -e 'using Pkg; Pkg.develop([PackageSpec(url="https://github.com/Tractables/LogicCircuits.jl.git"),PackageSpec(url="https://github.com/Tractables/ProbabilisticCircuits.jl.git")])'


## Testing
Expand Down Expand Up @@ -57,8 +57,8 @@ The example is for Circuit Model Zoo, but should work for others:

1. Push new updates to [UCLA-StarAI/Circuit-Model-Zoo](https://github.com/UCLA-StarAI/Circuit-Model-Zoo)
2. Do a [new zoo release](https://github.com/UCLA-StarAI/Circuit-Model-Zoo/releases).
3. Update the `LogicCircuits.jl`'s `Artifact.toml` file with new git tag and hash. Example commit can be found [here](https://github.com/Juice-jl/LogicCircuits.jl/commit/1cd3fda02fa7bd82d1fa02898ee404edce0d7b14).
4. Do the same for `ProbabilisticCircuits.jl`'s `Artifact.toml` file. Example commit [here](https://github.com/Juice-jl/ProbabilisticCircuits.jl/commit/da7d3678b5f2254e60229632f74cc619505e2b2d).
3. Update the `LogicCircuits.jl`'s `Artifact.toml` file with new git tag and hash. Example commit can be found [here](https://github.com/Tractables/LogicCircuits.jl/commit/1cd3fda02fa7bd82d1fa02898ee404edce0d7b14).
4. Do the same for `ProbabilisticCircuits.jl`'s `Artifact.toml` file. Example commit [here](https://github.com/Tractables/ProbabilisticCircuits.jl/commit/da7d3678b5f2254e60229632f74cc619505e2b2d).
5. Note that for each Artifact.toml, 2 things need to change: `git-tree-sha1` and `sha256`.
6. Update the `const zoo_version = "/Circuit-Model-Zoo-0.1.4"` inside LogicCircuits.jl to the new zoo version. No changes needed in ProbabilisticCircuits since it uses the same constant.

Expand Down
2 changes: 1 addition & 1 deletion docs/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ For more information about pretty URLs, check out [the documentation](https://j

## Setting Up LaTeX

Some of plotting tools we use need LaTeX to be installed. Follow the instructions from [TikzPictures.jl](https://github.com/JuliaTeX/TikzPictures.jl) to see what packages are needed. Or you can check the [ci.yml](https://github.com/Juice-jl/ProbabilisticCircuits.jl/blob/master/.github/workflows/ci.yml) which builds our documentation on github actions. If you ran into any issues might be due to old version of TexLive.
Some of plotting tools we use need LaTeX to be installed. Follow the instructions from [TikzPictures.jl](https://github.com/JuliaTeX/TikzPictures.jl) to see what packages are needed. Or you can check the [ci.yml](https://github.com/Tractables/ProbabilisticCircuits.jl/blob/master/.github/workflows/ci.yml) which builds our documentation on github actions. If you ran into any issues might be due to old version of TexLive.
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else
Documenter.HTML(
# Use clean URLs, unless built as a "local" build
prettyurls = !("local" in ARGS),
canonical = "https://juice-jl.github.io/ProbabilisticCircuits.jl/stable/",
canonical = "https://Tractables.github.io/ProbabilisticCircuits.jl/stable/",
assets = ["assets/favicon.ico"],
analytics = "UA-136089579-2",
highlights = ["yaml"],
Expand All @@ -94,7 +94,7 @@ makedocs(
# for more information.
deploydocs(
target = "build",
repo = "github.com/Juice-jl/ProbabilisticCircuits.jl.git",
repo = "github.com/Tractables/ProbabilisticCircuits.jl.git",
branch = "gh-pages",
devbranch = "master",
devurl = "dev",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/README.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

# # Probabilistic<wbr>Circuits<wbr>.jl

# [![Unit Tests](https://github.com/Juice-jl/ProbabilisticCircuits.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Juice-jl/ProbabilisticCircuits.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster) [![codecov](https://codecov.io/gh/Juice-jl/ProbabilisticCircuits.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/Juice-jl/ProbabilisticCircuits.jl) [![](https://img.shields.io/badge/docs-stable-green.svg)](https://juice-jl.github.io/ProbabilisticCircuits.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://juice-jl.github.io/ProbabilisticCircuits.jl/dev)
# [![Unit Tests](https://github.com/Tractables/ProbabilisticCircuits.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Tractables/ProbabilisticCircuits.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster) [![codecov](https://codecov.io/gh/Tractables/ProbabilisticCircuits.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/Tractables/ProbabilisticCircuits.jl) [![](https://img.shields.io/badge/docs-stable-green.svg)](https://Tractables.github.io/ProbabilisticCircuits.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://Tractables.github.io/ProbabilisticCircuits.jl/dev)

# This package provides functionalities for learning/constructing probabilistic circuits and using them to compute various probabilistic queries. It is part of the [Juice package](https://github.com/Juice-jl) (Julia Circuit Empanada).
# This package provides functionalities for learning/constructing probabilistic circuits and using them to compute various probabilistic queries. It is part of the [Juice package](https://github.com/Tractables) (Julia Circuit Empanada).

# ## Testing

Expand Down
2 changes: 1 addition & 1 deletion docs/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ julia -e 'using Pkg; Pkg.add("ProbabilisticCircuits")'
You can also install the package with the latest commits on master branch.

```bash
julia -e 'using Pkg; Pkg.add([PackageSpec(url="https://github.com/Juice-jl/ProbabilisticCircuits.jl.git")])'
julia -e 'using Pkg; Pkg.add([PackageSpec(url="https://github.com/Tractables/ProbabilisticCircuits.jl.git")])'
```
#### From Package mode
!!! note
Expand Down
2 changes: 1 addition & 1 deletion docs/src/usage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exp(circuit(true, true, true) - circuit(missing, true, true)) # Pr(rain=1|rainbo
assignments, log_prob = MAP(circuit, [missing, missing, missing]; batch_size=1)
print("The MAP assignment of the circuit is (rain=$(assignments[1]), rainbow=$(assignments[2]), wet=$(assignments[3])), with probability $(exp(log_prob)).")

# Besides the above examples, ProbabilisticCircuits.jl provides functionalities for a wide variety of queries, which are detailed in [this manual](https://juice-jl.github.io/ProbabilisticCircuits.jl/stable/manual/queries/).
# Besides the above examples, ProbabilisticCircuits.jl provides functionalities for a wide variety of queries, which are detailed in [this manual](https://Tractables.github.io/ProbabilisticCircuits.jl/stable/manual/queries/).

# ### Building complex circuit structures

Expand Down
Loading