aspire-inference 0.1.0a3__py3-none-any.whl → 0.1.0a5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
aspire/samples.py CHANGED
@@ -216,6 +216,20 @@ class BaseSamples:
216
216
  **kwargs,
217
217
  )
218
218
 
219
+ def __getstate__(self):
220
+ state = self.__dict__.copy()
221
+ # replace xp (callable) with module name string
222
+ if self.xp is not None:
223
+ state["xp"] = (
224
+ self.xp.__name__ if hasattr(self.xp, "__name__") else None
225
+ )
226
+ return state
227
+
228
+ def __setstate__(self, state):
229
+ # Restore xp by checking the namespace of x
230
+ state["xp"] = array_namespace(state["x"])
231
+ self.__dict__.update(state)
232
+
219
233
 
220
234
  @dataclass
221
235
  class Samples(BaseSamples):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aspire-inference
3
- Version: 0.1.0a3
3
+ Version: 0.1.0a5
4
4
  Summary: Accelerate Sequential Posterior Inference via REuse
5
5
  Author-email: "Michael J. Williams" <michaeljw1@googlemail.com>
6
6
  License: MIT
@@ -23,6 +23,7 @@ Requires-Dist: flowjax; extra == "jax"
23
23
  Provides-Extra: torch
24
24
  Requires-Dist: torch; extra == "torch"
25
25
  Requires-Dist: zuko; extra == "torch"
26
+ Requires-Dist: tqdm; extra == "torch"
26
27
  Provides-Extra: minipcn
27
28
  Requires-Dist: minipcn; extra == "minipcn"
28
29
  Provides-Extra: emcee
@@ -2,7 +2,7 @@ aspire/__init__.py,sha256=45R0xWaLg0aJEPK5zoTK0aIek0KOwpHwQWS1jLCDhIE,365
2
2
  aspire/aspire.py,sha256=AEkFUuOCF4F_iXUqRNst_4mucxozYRK4fG4V2wGrT4Q,15762
3
3
  aspire/history.py,sha256=l_j-riZKbTWK7Wz9zvvD_mTk9psNCKItiveYhr_pYv8,4313
4
4
  aspire/plot.py,sha256=oXwUDOb_953_ADm2KLk41JIfpE3JeiiQiSYKvUVwLqw,1423
5
- aspire/samples.py,sha256=hMlONOtSuYE3bU6r_wQCZ8Z1dcc3Ch15bNMLO8fGU8g,16263
5
+ aspire/samples.py,sha256=mVyoHNcTPgqJXjKNeF2oA-KNV1asriWjToWX-T70E5k,16729
6
6
  aspire/transforms.py,sha256=fg2_UELJWjJ6gnqQi6X7s1CgKBhQ5hP7Ipil3tTjCeg,16566
7
7
  aspire/utils.py,sha256=fQeLMauCN3vAogKbVTVg9jfjW7nTEFi7V6Ot-BYNfxE,14301
8
8
  aspire/flows/__init__.py,sha256=3gGXF4HziMlZSmcEdJ_uHtrP-QEC6RXvylm4vtM-Xnk,1306
@@ -21,8 +21,8 @@ aspire/samplers/smc/base.py,sha256=GePA6tm8Dno_AjCeNuRX3KOaKnoKSFHSRAb-QWx9wJE,1
21
21
  aspire/samplers/smc/blackjax.py,sha256=9w1ORzWTT1viwp99_ttLxnNMdgTO-VqAzsf-NhgG9vY,11722
22
22
  aspire/samplers/smc/emcee.py,sha256=ZXXyN2l1Bz5ZsCPEcswg-Kakiw41nNa2jEW1N8zGjuc,2498
23
23
  aspire/samplers/smc/minipcn.py,sha256=ZjeP4iHFR67G8WKEfMe0b1McrtPgQMNHyyy4vRx6WNE,2747
24
- aspire_inference-0.1.0a3.dist-info/licenses/LICENSE,sha256=DN-eRtBfS9dZyT0Ds0Mdn2Y4nb-ZQ7h71vpASYBm5k4,1076
25
- aspire_inference-0.1.0a3.dist-info/METADATA,sha256=jwpdVn7ns4Fa6hEfFr3sNB3XXJJ5ApdKEry_H-APddA,1536
26
- aspire_inference-0.1.0a3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- aspire_inference-0.1.0a3.dist-info/top_level.txt,sha256=9FRIYEl2xwVFG7jSOBHsElHQ0y3_4fq01Cf4_OyMQn8,7
28
- aspire_inference-0.1.0a3.dist-info/RECORD,,
24
+ aspire_inference-0.1.0a5.dist-info/licenses/LICENSE,sha256=DN-eRtBfS9dZyT0Ds0Mdn2Y4nb-ZQ7h71vpASYBm5k4,1076
25
+ aspire_inference-0.1.0a5.dist-info/METADATA,sha256=Vq1jmMMrg6taHSFqJOCZJUex7wdakeoL7K6844VSlDs,1574
26
+ aspire_inference-0.1.0a5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ aspire_inference-0.1.0a5.dist-info/top_level.txt,sha256=9FRIYEl2xwVFG7jSOBHsElHQ0y3_4fq01Cf4_OyMQn8,7
28
+ aspire_inference-0.1.0a5.dist-info/RECORD,,