Skip to content

Commit

Permalink
remove gzip
Browse files Browse the repository at this point in the history
  • Loading branch information
xiesl97 authored Nov 28, 2024
1 parent d1cdd74 commit 52c9e77
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/elisa/infer/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

import gzip
import time
from abc import ABC, abstractmethod
from collections.abc import Sequence
Expand Down Expand Up @@ -640,7 +639,7 @@ def nuts(
)

if load_warmup is not None:
with gzip.open(load_warmup, 'rb') as f:
with open(load_warmup, 'rb') as f:
last_state = dill.load(f)
sampler.post_warmup_state = last_state
sampler.run(sampler.post_warmup_state.rng_key)
Expand All @@ -658,7 +657,7 @@ def nuts(
)

if save_warmup is not None:
with gzip.open(save_warmup, 'wb') as f:
with open(save_warmup, 'wb') as f:
dill.dump(sampler.last_state, f)

return PosteriorResult(sampler, self._helper, self)
Expand Down Expand Up @@ -1321,7 +1320,7 @@ def sa(
)

if load_warmup is not None:
with gzip.open(load_warmup, 'rb') as f:
with open(load_warmup, 'rb') as f:
last_state = dill.load(f)
sampler.post_warmup_state = last_state
sampler.run(sampler.post_warmup_state.rng_key)
Expand All @@ -1337,7 +1336,7 @@ def sa(
)

if save_warmup is not None:
with gzip.open(save_warmup, 'wb') as f:
with open(save_warmup, 'wb') as f:
dill.dump(sampler.last_state, f)

return PosteriorResult(sampler, self._helper, self)

0 comments on commit 52c9e77

Please sign in to comment.