Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
COBREXA.jl
Manage
Activity
Members
Plan
External wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LCSB-BioCore
COBREXA.jl
Commits
0002153a
Unverified
Commit
0002153a
authored
3 years ago
by
St. Elmo
Browse files
Options
Downloads
Patches
Plain Diff
stuck
parent
3982053c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/analysis/sampling/hit_and_run.jl
+9
-6
9 additions, 6 deletions
src/analysis/sampling/hit_and_run.jl
with
9 additions
and
6 deletions
src/analysis/sampling/hit_and_run.jl
+
9
−
6
View file @
0002153a
...
...
@@ -64,24 +64,27 @@ function hit_and_run(
optimizer
;
modifications
=
modifications
,
workers
=
workers
,
# parallel
warmup_points
=
warmup_indices
)
# load warmup points to workers
save_at
.
(
workers
,
:
_cobrexa_hit_and_run_warmup
,
Ref
(
:
(
$
ws
,
$
lbs
,
$
ubs
)))
save_at
.
(
workers
,
:
cobrexa_ws
,
Ref
(
:
(
$
ws
)))
save_at
.
(
workers
,
:
cobrexa_lbs
,
Ref
(
:
(
$
lbs
)))
save_at
.
(
workers
,
:
cobrexa_ubs
,
Ref
(
:
(
$
ubs
)))
# do in parallel!
samples
=
dpmap
(
x
->
:
(
$
COBREXA
.
_serial_hit_and_run
(
ws
,
lbs
,
ubs
,
$
samplesize
,
$
keepevery
,
$
N
)),
x
->
:
(
$
COBREXA
.
_serial_hit_and_run
(
cobrexa_ws
,
cobrexa_lbs
,
cobrexa_
ubs
,
$
samplesize
,
$
keepevery
,
$
N
)),
CachingPool
(
workers
),
1
:
nchains
,
)
# remove warmup points from workers
map
(
fetch
,
remove_from
.
(
workers
,
:
ws
))
map
(
fetch
,
remove_from
.
(
workers
,
:
lbs
))
map
(
fetch
,
remove_from
.
(
workers
,
:
ubs
))
map
(
fetch
,
remove_from
.
(
workers
,
:
cobrexa_
ws
))
map
(
fetch
,
remove_from
.
(
workers
,
:
cobrexa_
lbs
))
map
(
fetch
,
remove_from
.
(
workers
,
:
cobrexa_
ubs
))
# not sure how to do this better
# not sure how to do this better
- cat/vcat doesn't work, oh well
vals
=
zeros
(
samplesize
,
length
(
lbs
),
nchains
)
for
c
=
1
:
nchains
vals
[
:
,
:
,
c
]
=
samples
[
c
]
'
...
...
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