metacontroller-pytorch 0.0.27__tar.gz → 0.0.28__tar.gz

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.

Potentially problematic release.


This version of metacontroller-pytorch might be problematic. Click here for more details.

Files changed (16) hide show
  1. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/PKG-INFO +1 -1
  2. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/metacontroller/metacontroller_with_binary_mapper.py +3 -1
  3. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/pyproject.toml +1 -1
  4. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/.github/workflows/python-publish.yml +0 -0
  5. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/.github/workflows/test.yml +0 -0
  6. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/.gitignore +0 -0
  7. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/LICENSE +0 -0
  8. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/README.md +0 -0
  9. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/fig1.png +0 -0
  10. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/gather_babyai_trajs.py +0 -0
  11. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/metacontroller/__init__.py +0 -0
  12. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/metacontroller/metacontroller.py +0 -0
  13. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/test_babyai_e2e.sh +0 -0
  14. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/tests/test_metacontroller.py +0 -0
  15. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/train_babyai.py +0 -0
  16. {metacontroller_pytorch-0.0.27 → metacontroller_pytorch-0.0.28}/train_behavior_clone_babyai.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metacontroller-pytorch
3
- Version: 0.0.27
3
+ Version: 0.0.28
4
4
  Summary: Transformer Metacontroller
5
5
  Project-URL: Homepage, https://pypi.org/project/metacontroller/
6
6
  Project-URL: Repository, https://github.com/lucidrains/metacontroller
@@ -23,7 +23,7 @@ from x_mlps_pytorch import Feedforwards
23
23
 
24
24
  from assoc_scan import AssocScan
25
25
 
26
- from torch_einops_utils import maybe, pad_at_dim, lens_to_mask
26
+ from torch_einops_utils import maybe, pad_at_dim, lens_to_mask, align_dims_left
27
27
  from torch_einops_utils.save_load import save_load
28
28
 
29
29
  from vector_quantize_pytorch import BinaryMapper
@@ -220,6 +220,8 @@ class MetaControllerWithBinaryMapper(Module):
220
220
  if discovery_phase:
221
221
  # weight unreduced kl loss by switch gates
222
222
 
223
+ kl_loss, switch_beta = align_dims_left((kl_loss, switch_beta))
224
+
223
225
  weighted_kl_loss = kl_loss * switch_beta
224
226
  kl_loss = weighted_kl_loss.sum(dim = -1).mean()
225
227
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "metacontroller-pytorch"
3
- version = "0.0.27"
3
+ version = "0.0.28"
4
4
  description = "Transformer Metacontroller"
5
5
  authors = [
6
6
  { name = "Phil Wang", email = "lucidrains@gmail.com" }