Skip to content

Commit fe7ea13

Browse files
committed
Fixing the merge situation
1 parent 9cdd9eb commit fe7ea13

File tree

25 files changed

+2306
-1372
lines changed

25 files changed

+2306
-1372
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Sciope PYPI workflow
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: __token__
28+
TWINE_PASSWORD: ${{ secrets.PYPI }}
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*

.travis.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
language: python
22
python:
3-
- "3.5"
43
- "3.6"
5-
# command to install dependencies
6-
before_install:
7-
- sudo apt-get install -y libxml2 libxml2-dev
4+
- "3.7"
5+
- "3.8"
86
install:
97
- python3 -m pip install gillespy2
108
- pip install pytest
@@ -15,15 +13,9 @@ install:
1513
- pip install .
1614
# tests should run from the tests directory
1715
before_script:
18-
- wget https://github.com/StochSS/StochKit/archive/master.zip
19-
- unzip master.zip
20-
- cd StochKit-master
21-
- ./install.sh
22-
- export STOCHKIT_HOME=$PWD
23-
- cd ..
2416
- cd sciope/tests
2517
# command to run tests
26-
script: travis_wait 30 py.test --cov-report term --cov
18+
script: pytest --cov-report term --cov
2719
after_success:
2820
- codecov
2921
- cd ../../docs/ && make html
@@ -33,7 +25,7 @@ deploy:
3325
skip-cleanup: true
3426
keep-history: true
3527
on:
36-
branch: develop
28+
branch: master
3729
github-token: $GITHUB_TOKEN
3830
local-dir: docs/build/html
3931
committer-from-gh: true

docs/source/index.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
:width: 100%
99
:align: center
1010

11-
Welcome to sciope's documentation!
11+
Welcome to Sciope's documentation!
1212
===============================
1313

1414
Scalable inference, optimization and parameter exploration (sciope)
1515
is a Python 3 package for performing machine learning-assisted likelihood-free inference and model
1616
exploration by large-scale parameter sweeps. It has been designed to simplify the data-driven workflows
17-
so that users quickly can test and develop new machine learning-assisted approches to likelihood-free inference
17+
so that users quickly can test and develop new machine learning-assisted approaches to likelihood-free inference
1818
and model exploration.
1919

20-
Salient features and contributions of sciope include:
20+
Salient features and contributions of Sciope include:
2121

2222
Systems:
2323

@@ -38,7 +38,7 @@ Methodology:
3838
Stochastic Gene Regulatory Networks
3939
-----------------------------------
4040
Sciope has been designed for (but is not limited to) Stochastic Gene Regulatory Networks (GRN).
41-
Sciope have built-in support and wrappers for `Gillespy2 <https://github.com/GillesPy2/GillesPy2>`_
41+
Sciope has built-in support and wrappers for `Gillespy2 <https://github.com/GillesPy2/GillesPy2>`_
4242
and is part of the development of next-generation `StochSS <https://stochss.org>`_.
4343

4444
Likelihood-free inference
@@ -66,23 +66,23 @@ with a `Dask <https://dask.org>`_ backend to support massive parallelism on plat
6666

6767
Installation
6868
===============================
69-
You can install sciope with ``pip``, or by installing from source.
69+
You can install Sciope with ``pip``, or by installing from source.
7070

7171
Pip
7272
---
7373

74-
This will install both sciope and other dependencies like NumPy, sklearn,
74+
This will install both Sciope and other dependencies like NumPy, sklearn,
7575
and so on that are necessary::
7676

7777
pip install sciope
7878

7979
Install from Source
8080
-------------------
8181

82-
To install sciope from source, clone the repository from `github
83-
<https://github.com/sciope/sciope>`_::
82+
To install Sciope from source, clone the repository from `github
83+
<https://github.com/StochSS/sciope>`_::
8484

85-
git clone https://github.com/sciope/sciope.git
85+
git clone https://github.com/StochSS/sciope.git
8686
cd sciope
8787
pip install .
8888

@@ -162,7 +162,7 @@ Use Sciope's Gillespy2 wrapper to extract simulator and parameters
162162
163163
Use Latin Hypercube design to generate points which will be sampled from during exploration, the points will
164164
be generated using distributed resources if we have a Dask client initialized (in this example just a local cluster).
165-
Generated points will be persited over the worker nodes (i.e no local memory would be used in case of a real cluster).
165+
Generated points will be persisted over the worker nodes (i.e no local memory would be used in case of a real cluster).
166166
Random points from the persisted collection can be gathered by calling :code:`lhc.draw(n_samples)`
167167
Here, we will also use TSFRESH minimal feature set as our summary statistics.
168168

@@ -210,7 +210,7 @@ it is therefore required that you run in a jupyter notebook with an interactive
210210
:width: 100%
211211
:align: center
212212

213-
Once at least a few points have been assigned a label, sciope has support for semi-supervised learning using label propagation where
213+
Once at least a few points have been assigned a label, Sciope has support for semi-supervised learning using label propagation where
214214
we can infer the labels of unassigned points. This is a great way of filtering the vast amount of data according qualitative behaviour
215215
and preferences.
216216

examples/inference/MA2/ma2_inference.ipynb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
"outputs": [],
4747
"source": [
4848
"# Set up simulation\n",
49+
"# We use 10,000 samples in the training dataset to be able to run the notebook quickly, which is comparitively few\n",
50+
"# For accurate inference, the number should be 1 or 2 orders of magnitude more.\n",
4951
"sim = simulate\n",
5052
"true_param = [0.6, 0.2] # true \\theta moving average2\n",
5153
"\n",
@@ -59,7 +61,7 @@
5961
"validation_ts = np.expand_dims(np.array([simulate(p, n=100) for p in validation_thetas]), 2)\n",
6062
"\n",
6163
"test_thetas = np.array(prior(n=10000))\n",
62-
"test_ts = np.expand_dims(np.array([simulate(p, n=100) for p in validation_thetas]), 2)\n",
64+
"test_ts = np.expand_dims(np.array([simulate(p, n=100) for p in test_thetas]), 2)\n",
6365
"\n",
6466
"abc_trial_thetas = np.array(prior(n=30000))\n",
6567
"abc_trial_ts = np.expand_dims(np.array([simulate(p, n=100) for p in abc_trial_thetas]), 2)"
@@ -233,9 +235,9 @@
233235
"name": "stdout",
234236
"output_type": "stream",
235237
"text": [
236-
"CNN test MAE = 0.7031869420803443, MAE at true point = 0.1392668604850769\n",
237-
"DNN test MAE = 0.7157589187285183, MAE at true point = 0.2387733519077301\n",
238-
"PEN test MAE = 0.7589048176817108, MAE at true point = 0.12148187458515167\n"
238+
"CNN test MAE = 0.3804093829415728, MAE at true point = 0.571735179424286\n",
239+
"DNN test MAE = 0.32691127034054135, MAE at true point = 0.2187902897596359\n",
240+
"PEN test MAE = 0.19167063390147682, MAE at true point = 0.1489650845527649\n"
239241
]
240242
}
241243
],
@@ -323,8 +325,8 @@
323325
"name": "stdout",
324326
"output_type": "stream",
325327
"text": [
326-
"[[0.36439425 0.24292797]]\n",
327-
"MAE upon comparison as a statistic = 0.1392668604850769\n"
328+
"[[1.21066892 0.73280144]]\n",
329+
"MAE upon comparison as a statistic = 0.571735179424286\n"
328330
]
329331
}
330332
],
@@ -420,7 +422,7 @@
420422
"name": "stdout",
421423
"output_type": "stream",
422424
"text": [
423-
"ABC mean inference error = 1.1916615337995151\n"
425+
"ABC mean inference error = 1.172768172952754\n"
424426
]
425427
}
426428
],

0 commit comments

Comments
 (0)