Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mhc_rank
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patrick Skillman-Lawrence
mhc_rank
Commits
24a0dadc
Commit
24a0dadc
authored
7 years ago
by
Tim O'Donnell
Browse files
Options
Downloads
Patches
Plain Diff
better logging
parent
3d1c8971
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mhcflurry/train_allele_specific_models_command.py
+10
-4
10 additions, 4 deletions
mhcflurry/train_allele_specific_models_command.py
with
10 additions
and
4 deletions
mhcflurry/train_allele_specific_models_command.py
+
10
−
4
View file @
24a0dadc
...
...
@@ -215,15 +215,16 @@ def run(argv=sys.argv[1:]):
# which it adds models to, so no merging is required. It also saves
# as it goes so no saving is required at the end.
start
=
time
.
time
()
for
_
in
tqdm
.
trange
(
len
(
work_items
)):
item
=
work_items
.
pop
(
0
)
# want to keep freeing up memory
work_predictor
=
work_entrypoint
(
item
)
assert
work_predictor
is
predictor
assert
not
work_items
print
(
"
*
"
*
30
)
print
(
"
Trained %d networks in %0.2f sec.
"
%
(
len
(
predictor
.
neural_networks
),
time
.
time
()
-
start
))
training_time
=
time
.
time
()
-
start
print
(
"
Trained affinity predictor with %d networks in %0.2f sec.
"
%
(
len
(
predictor
.
neural_networks
),
training_time
))
print
(
"
*
"
*
30
)
if
args
.
percent_rank_calibration_num_peptides_per_length
>
0
:
...
...
@@ -232,14 +233,19 @@ def run(argv=sys.argv[1:]):
predictor
.
calibrate_percentile_ranks
(
num_peptides_per_length
=
args
.
percent_rank_calibration_num_peptides_per_length
,
worker_pool
=
worker_pool
)
percent_rank_calibration_time
=
time
.
time
()
-
start
print
(
"
Finished calibrating percent ranks in %0.2f sec.
"
%
(
time
.
time
()
-
start
))
percent_rank_calibration_time
))
predictor
.
save
(
args
.
out_models_dir
,
model_names_to_write
=
[])
if
worker_pool
:
worker_pool
.
close
()
worker_pool
.
join
()
print
(
"
Train time: %0.2f sec. Percent rank calibration time: %0.2f sec.
"
%
(
training_time
,
percent_rank_calibration_time
))
print
(
"
Predictor written to: %s
"
%
args
.
out_models_dir
)
def
work_entrypoint
(
item
):
return
process_work
(
**
item
)
...
...
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