Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
bilby
Commits
988c3589
Commit
988c3589
authored
6 years ago
by
Moritz Huebner
Browse files
Options
Downloads
Plain Diff
Merge branch '189-cpnest-broken' into 'master'
Resolve "cpnest broken" Closes
#189
See merge request Monash/tupak!197
parents
797886f1
7fe4c89a
No related branches found
No related tags found
1 merge request
!197
Resolve "cpnest broken"
Pipeline
#31655
passed
6 years ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/core/sampler/cpnest.py
+4
-4
4 additions, 4 deletions
tupak/core/sampler/cpnest.py
with
4 additions
and
4 deletions
tupak/core/sampler/cpnest.py
+
4
−
4
View file @
988c3589
from
__future__
import
absolute_import
import
numpy
as
np
from
pandas
import
DataFrame
from
..utils
import
logger
...
...
@@ -50,10 +51,9 @@ class Cpnest(Sampler):
self
.
__kwargs
.
update
(
kwargs
)
def
_run_external_sampler
(
self
):
cpnest
=
self
.
external_sampler
import
cpnest.model
from
cpnest
import
model
as
cpmodel
,
CPNest
class
Model
(
cp
nest
.
model
.
Model
):
class
Model
(
cpmodel
.
Model
):
"""
A wrapper class to pass our log_likelihood into cpnest
"""
def
__init__
(
self
,
names
,
bounds
):
self
.
names
=
names
...
...
@@ -79,7 +79,7 @@ class Cpnest(Sampler):
bounds
=
[[
self
.
priors
[
key
].
minimum
,
self
.
priors
[
key
].
maximum
]
for
key
in
self
.
search_parameter_keys
]
model
=
Model
(
self
.
search_parameter_keys
,
bounds
)
out
=
cpnest
.
CPNest
(
model
,
output
=
self
.
outdir
,
**
self
.
kwargs
)
out
=
CPNest
(
model
,
output
=
self
.
outdir
,
**
self
.
kwargs
)
out
.
run
()
if
self
.
plot
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment