metacontroller-pytorch 0.0.29__tar.gz → 0.0.30__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 (17) hide show
  1. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/PKG-INFO +1 -1
  2. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/metacontroller/metacontroller.py +2 -1
  3. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/metacontroller/metacontroller_with_binary_mapper.py +2 -1
  4. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/pyproject.toml +1 -1
  5. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/tests/test_metacontroller.py +1 -1
  6. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/.github/workflows/python-publish.yml +0 -0
  7. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/.github/workflows/test.yml +0 -0
  8. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/.gitignore +0 -0
  9. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/LICENSE +0 -0
  10. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/README.md +0 -0
  11. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/fig1.png +0 -0
  12. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/gather_babyai_trajs.py +0 -0
  13. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/metacontroller/__init__.py +0 -0
  14. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/metacontroller/metacontroller_with_resnet.py +0 -0
  15. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/test_babyai_e2e.sh +0 -0
  16. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/train_babyai.py +0 -0
  17. {metacontroller_pytorch-0.0.29 → metacontroller_pytorch-0.0.30}/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.29
3
+ Version: 0.0.30
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
@@ -58,6 +58,7 @@ def straight_through(src, tgt):
58
58
 
59
59
  MetaControllerOutput = namedtuple('MetaControllerOutput', (
60
60
  'prev_hiddens',
61
+ 'input_residual_stream',
61
62
  'action_dist',
62
63
  'actions',
63
64
  'kl_loss',
@@ -268,7 +269,7 @@ class MetaController(Module):
268
269
  sampled_latent_action[:, -1:]
269
270
  )
270
271
 
271
- return control_signal, MetaControllerOutput(next_hiddens, action_dist, sampled_latent_action, kl_loss, switch_loss)
272
+ return control_signal, MetaControllerOutput(next_hiddens, residual_stream, action_dist, sampled_latent_action, kl_loss, switch_loss)
272
273
 
273
274
  # main transformer, which is subsumed into the environment after behavioral cloning
274
275
 
@@ -52,6 +52,7 @@ def straight_through(src, tgt):
52
52
 
53
53
  MetaControllerOutput = namedtuple('MetaControllerOutput', (
54
54
  'prev_hiddens',
55
+ 'input_residual_stream',
55
56
  'action_dist',
56
57
  'codes',
57
58
  'kl_loss',
@@ -265,4 +266,4 @@ class MetaControllerWithBinaryMapper(Module):
265
266
  sampled_codes[:, -1:]
266
267
  )
267
268
 
268
- return control_signal, MetaControllerOutput(next_hiddens, binary_logits, sampled_codes, kl_loss, switch_loss)
269
+ return control_signal, MetaControllerOutput(next_hiddens, residual_stream, binary_logits, sampled_codes, kl_loss, switch_loss)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "metacontroller-pytorch"
3
- version = "0.0.29"
3
+ version = "0.0.30"
4
4
  description = "Transformer Metacontroller"
5
5
  authors = [
6
6
  { name = "Phil Wang", email = "lucidrains@gmail.com" }
@@ -59,7 +59,7 @@ def test_metacontroller(
59
59
  dim_model = 512,
60
60
  dim_meta_controller = 256,
61
61
  switch_per_code = switch_per_latent_dim,
62
- dim_code_bits = 8, # 2**8 = 256 codes
62
+ dim_code_bits = 8, # 2 ** 8 = 256 codes
63
63
  )
64
64
 
65
65
  # discovery phase