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
06a6cd89
Commit
06a6cd89
authored
3 years ago
by
Moritz Huebner
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-cache-check-for-dictionaries' into 'master'
Improve the cache check See merge request
!1035
parents
f7088b5e
18b3e164
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1035
Improve the cache check
Pipeline
#311129
passed
3 years ago
Stage: initial
Stage: test
Stage: docs
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bilby/core/sampler/base_sampler.py
+7
-1
7 additions, 1 deletion
bilby/core/sampler/base_sampler.py
with
7 additions
and
1 deletion
bilby/core/sampler/base_sampler.py
+
7
−
1
View file @
06a6cd89
...
@@ -512,7 +512,13 @@ class Sampler(object):
...
@@ -512,7 +512,13 @@ class Sampler(object):
key
,
self
)
is
False
:
key
,
self
)
is
False
:
logger
.
debug
(
"
Cached value {} is unmatched
"
.
format
(
key
))
logger
.
debug
(
"
Cached value {} is unmatched
"
.
format
(
key
))
use_cache
=
False
use_cache
=
False
if
self
.
meta_data
[
"
likelihood
"
]
!=
self
.
cached_result
.
meta_data
[
"
likelihood
"
]:
try
:
# Recursive check the dictionaries allowing for numpy arrays
np
.
testing
.
assert_equal
(
self
.
meta_data
[
"
likelihood
"
],
self
.
cached_result
.
meta_data
[
"
likelihood
"
]
)
except
AssertionError
:
use_cache
=
False
use_cache
=
False
if
use_cache
is
False
:
if
use_cache
is
False
:
self
.
cached_result
=
None
self
.
cached_result
=
None
...
...
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