Skip to content

Commit

Permalink
deep copying model
Browse files Browse the repository at this point in the history
  • Loading branch information
matsen committed Jun 4, 2024
1 parent 7ee3cd5 commit 40fbd5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion netam/dnsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"""

import copy
import multiprocessing as mp

import torch
Expand Down Expand Up @@ -418,7 +419,7 @@ def worker_optimize_branch_length(model, dataset, optimization_kwargs):
"""
The worker used for parallel branch length optimization.
"""
burrito = DNSMBurrito(None, dataset, model)
burrito = DNSMBurrito(None, dataset, copy.deepcopy(model))
return burrito.serial_find_optimal_branch_lengths(dataset, **optimization_kwargs)


Expand Down

0 comments on commit 40fbd5f

Please sign in to comment.