tensor-optix 2.0.7__tar.gz → 2.0.8__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.
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/PKG-INFO +8 -5
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/README.md +7 -4
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/pyproject.toml +1 -1
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/factory.py +1 -1
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/multi_agent/multi_agent_runtime.py +671 -671
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/multi_agent/self_play.py +292 -292
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/agent/graph_agent.py +174 -156
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/brain_network.py +4 -1
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/controller/topology_controller.py +122 -63
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/graph/neuron.py +13 -15
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/graph/neuron_graph.py +472 -52
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/graph/topology_ops.py +7 -8
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/hebbian.py +104 -39
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/optimizer/topology_aware_adam.py +62 -1
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix.egg-info/PKG-INFO +8 -5
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/setup.cfg +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/jax/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/jax/flax_agent.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/jax/flax_evaluator.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/pytorch/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/pytorch/torch_agent.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/pytorch/torch_evaluator.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/tensorflow/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/tensorflow/tf_agent.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/adapters/tensorflow/tf_evaluator.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/flax_ppo.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/tf_dqn.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/tf_ppo.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/tf_ppo_continuous.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/tf_sac.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/tf_td3.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/torch_dqn.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/torch_ppo.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/torch_ppo_continuous.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/torch_rainbow_dqn.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/torch_recurrent_ppo.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/torch_sac.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/algorithms/torch_td3.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/callbacks/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/callbacks/rich_dashboard.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/callbacks/tensorboard_callback.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/callbacks/wandb_callback.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/cli.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/config.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/async_callback.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/backoff_scheduler.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/base_agent.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/base_evaluator.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/base_optimizer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/base_pipeline.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/checkpoint_confirmation.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/checkpoint_registry.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/device.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/diagnostic_controller.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/ensemble_agent.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/her_buffer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/loop_controller.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/meta_controller.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/noisy_linear.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/normalizers.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/obs_utils.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/policy_manager.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/regime_detector.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/replay_buffer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/resume_state.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/reward_shape.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/trajectory_buffer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/core/types.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/distributed/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/distributed/async_learner.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/distributed/vtrace.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/encoders/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/encoders/obs_encoder.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/encoders/obs_encoder_tf.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/exploration/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/exploration/rnd.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ledger/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ledger/callback.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ledger/provenance.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ledger/records.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ledger/schema.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ledger/store.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml/dataset_pipeline.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml/loss_registry.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml/ml_agent.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/adapters/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/adapters/flax_model.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/adapters/tf_model.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/adapters/torch_model.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/base_model.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/lr_schedules.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/metrics.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/metrics_impl/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/metrics_impl/classification.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/metrics_impl/regression.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/trainer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/ml_core/transfer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/multi_agent/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/multi_agent/aec_pipeline.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/multi_agent/multi_agent_episode.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/multi_agent/parallel_pipeline.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/multi_agent/seat_env.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/nanonets/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/nanonets/abstention.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/nanonets/features.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/nanonets/pooling.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/nanonets/selector.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/nanonets/smalln.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/agent/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/controller/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/controller/topology_callback.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/graph/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/neuromodulator.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/neuroevo/optimizer/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/optimizer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/optimizers/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/optimizers/adaptive_optimizer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/optimizers/backoff_optimizer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/optimizers/momentum_optimizer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/optimizers/pbt_optimizer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/optimizers/spsa_optimizer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/orchestrator.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/pipeline/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/pipeline/batch_pipeline.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/pipeline/live_pipeline.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/pipeline/vector_pipeline.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/runtime/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/runtime/baseline.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/runtime/experiment_stage.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/runtime/live_runtime.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/runtime/observer.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/runtime/promote.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/scheduler/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/scheduler/_mp_common.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/scheduler/budget.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/scheduler/dedup.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/scheduler/isolation.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/scheduler/pool.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/scheduler/retry.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/scheduler/worker.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/selection/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/selection/backfill.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/selection/selector.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/selection/uncertainty.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/simple.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/strategy/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/strategy/candidate.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/strategy/comparator.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/strategy/grammar.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/strategy/promotion.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/strategy/runner.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/strategy/worker.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/utils/__init__.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/utils/console.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix/utils/window_size.py +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix.egg-info/SOURCES.txt +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix.egg-info/dependency_links.txt +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix.egg-info/entry_points.txt +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix.egg-info/requires.txt +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tensor_optix.egg-info/top_level.txt +0 -0
- {tensor_optix-2.0.7 → tensor_optix-2.0.8}/tests/test_ml.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tensor-optix
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
4
4
|
Summary: Autonomous training loop for any sequential learning model — PPO, DQN, SAC, TD3, Rainbow DQN, Recurrent PPO for TensorFlow, PyTorch, and JAX/Flax; distributed async actor-learner (IMPALA + V-trace)
|
|
5
5
|
Author: sup3rus3r
|
|
6
6
|
License-Expression: MIT
|
|
@@ -518,7 +518,7 @@ All types implement the same protocol: `step()`, `importance()`, `can_merge_with
|
|
|
518
518
|
|
|
519
519
|
### Trainable recurrent neurons
|
|
520
520
|
|
|
521
|
-
`TrainableGRUNeuron` and `TrainableLSTMNeuron`
|
|
521
|
+
`TrainableGRUNeuron` and `TrainableLSTMNeuron` let gradients flow back through their hidden state. Use them with `RecurrentGraphAgent`, which keeps the graph's state across `act()` calls (reset at episode start via `reset_hidden()`) and trains with sequential chunks and truncated BPTT, replaying exactly what `act()` computed.
|
|
522
522
|
|
|
523
523
|
```python
|
|
524
524
|
from tensor_optix.neuroevo import TrainableGRUNeuron, TrainableLSTMNeuron, RecurrentGraphAgent
|
|
@@ -532,7 +532,8 @@ agent = RecurrentGraphAgent(
|
|
|
532
532
|
graph, obs_dim=4, n_actions=2,
|
|
533
533
|
hyperparams=HyperparamSet(params={"chunk_len": 64}),
|
|
534
534
|
)
|
|
535
|
-
# Falls back to standard shuffled-minibatch PPO if
|
|
535
|
+
# Falls back to standard shuffled-minibatch PPO if the graph holds no state
|
|
536
|
+
# (no GRU/LSTM neurons, no delayed edges)
|
|
536
537
|
```
|
|
537
538
|
|
|
538
539
|
### Topology controller
|
|
@@ -660,15 +661,17 @@ w = graph.effective_weight(edge_id) # reads post-softplus value
|
|
|
660
661
|
|
|
661
662
|
### TopologyAwareAdam
|
|
662
663
|
|
|
663
|
-
Drop-in Adam replacement
|
|
664
|
+
Drop-in Adam replacement for graphs whose parameters get replaced by topology changes. `GraphAgent` uses it and carries Adam's (m, v) moments across every grow, prune or merge by edge id, so surviving edges keep their momentum and new edges start from zero. You can also reset the state of specific parameters yourself:
|
|
664
665
|
|
|
665
666
|
```python
|
|
666
667
|
from tensor_optix.neuroevo import TopologyAwareAdam
|
|
667
668
|
|
|
668
669
|
optimizer = TopologyAwareAdam(graph.parameters(), lr=3e-4)
|
|
669
|
-
optimizer.notify_topology_change(new_params) #
|
|
670
|
+
optimizer.notify_topology_change(new_params) # reset (m, v) for these Parameters
|
|
670
671
|
```
|
|
671
672
|
|
|
673
|
+
After a rebuild, `new_optimizer.carry_over(old_optimizer, old_packed=..., old_ids=..., new_packed=..., new_ids=...)` moves the state across. See the [reference](https://sup3rus3r.github.io/tensor-optix/reference/neuroevo/topology-aware-adam/).
|
|
674
|
+
|
|
672
675
|
### Compiled forward
|
|
673
676
|
|
|
674
677
|
`NeuronGraph` runs in **eager mode by default**. Because `_raw_forward` mutates Python-side neuron state (`neuron._current`, `push_history`), `torch.compile` cannot safely trace it without replaying those side effects. The default eager path is safe for training, recurrent neurons, and dynamic topologies.
|
|
@@ -447,7 +447,7 @@ All types implement the same protocol: `step()`, `importance()`, `can_merge_with
|
|
|
447
447
|
|
|
448
448
|
### Trainable recurrent neurons
|
|
449
449
|
|
|
450
|
-
`TrainableGRUNeuron` and `TrainableLSTMNeuron`
|
|
450
|
+
`TrainableGRUNeuron` and `TrainableLSTMNeuron` let gradients flow back through their hidden state. Use them with `RecurrentGraphAgent`, which keeps the graph's state across `act()` calls (reset at episode start via `reset_hidden()`) and trains with sequential chunks and truncated BPTT, replaying exactly what `act()` computed.
|
|
451
451
|
|
|
452
452
|
```python
|
|
453
453
|
from tensor_optix.neuroevo import TrainableGRUNeuron, TrainableLSTMNeuron, RecurrentGraphAgent
|
|
@@ -461,7 +461,8 @@ agent = RecurrentGraphAgent(
|
|
|
461
461
|
graph, obs_dim=4, n_actions=2,
|
|
462
462
|
hyperparams=HyperparamSet(params={"chunk_len": 64}),
|
|
463
463
|
)
|
|
464
|
-
# Falls back to standard shuffled-minibatch PPO if
|
|
464
|
+
# Falls back to standard shuffled-minibatch PPO if the graph holds no state
|
|
465
|
+
# (no GRU/LSTM neurons, no delayed edges)
|
|
465
466
|
```
|
|
466
467
|
|
|
467
468
|
### Topology controller
|
|
@@ -589,15 +590,17 @@ w = graph.effective_weight(edge_id) # reads post-softplus value
|
|
|
589
590
|
|
|
590
591
|
### TopologyAwareAdam
|
|
591
592
|
|
|
592
|
-
Drop-in Adam replacement
|
|
593
|
+
Drop-in Adam replacement for graphs whose parameters get replaced by topology changes. `GraphAgent` uses it and carries Adam's (m, v) moments across every grow, prune or merge by edge id, so surviving edges keep their momentum and new edges start from zero. You can also reset the state of specific parameters yourself:
|
|
593
594
|
|
|
594
595
|
```python
|
|
595
596
|
from tensor_optix.neuroevo import TopologyAwareAdam
|
|
596
597
|
|
|
597
598
|
optimizer = TopologyAwareAdam(graph.parameters(), lr=3e-4)
|
|
598
|
-
optimizer.notify_topology_change(new_params) #
|
|
599
|
+
optimizer.notify_topology_change(new_params) # reset (m, v) for these Parameters
|
|
599
600
|
```
|
|
600
601
|
|
|
602
|
+
After a rebuild, `new_optimizer.carry_over(old_optimizer, old_packed=..., old_ids=..., new_packed=..., new_ids=...)` moves the state across. See the [reference](https://sup3rus3r.github.io/tensor-optix/reference/neuroevo/topology-aware-adam/).
|
|
603
|
+
|
|
601
604
|
### Compiled forward
|
|
602
605
|
|
|
603
606
|
`NeuronGraph` runs in **eager mode by default**. Because `_raw_forward` mutates Python-side neuron state (`neuron._current`, `push_history`), `torch.compile` cannot safely trace it without replaying those side effects. The default eager path is safe for training, recurrent neurons, and dynamic topologies.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tensor-optix"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.8"
|
|
8
8
|
description = "Autonomous training loop for any sequential learning model — PPO, DQN, SAC, TD3, Rainbow DQN, Recurrent PPO for TensorFlow, PyTorch, and JAX/Flax; distributed async actor-learner (IMPALA + V-trace)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -1063,7 +1063,7 @@ def _make_neuroevo_feature_extractor(
|
|
|
1063
1063
|
def save_weights(self, path):
|
|
1064
1064
|
super().save_weights(path)
|
|
1065
1065
|
torch.save(
|
|
1066
|
-
{"topology": graph.to_dict(), "graph": graph.state_dict(), "proj": _proj_cell["np"]},
|
|
1066
|
+
{"topology": graph.to_dict(include_weights=False), "graph": graph.state_dict(), "proj": _proj_cell["np"]},
|
|
1067
1067
|
os.path.join(path, "neuro_graph.pt"),
|
|
1068
1068
|
)
|
|
1069
1069
|
|