tensor-optix 2.1.0__tar.gz → 2.1.1__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.1.0 → tensor_optix-2.1.1}/PKG-INFO +3 -3
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/README.md +2 -2
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/pyproject.toml +1 -1
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/async_callback.py +19 -1
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/backoff_scheduler.py +2 -1
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/convergence.py +862 -704
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/loop_controller.py +43 -16
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/base_model.py +183 -178
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/trainer.py +75 -44
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/multi_agent/__init__.py +6 -4
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/multi_agent/multi_agent_runtime.py +29 -9
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/optimizer.py +8 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/runtime/observer.py +121 -109
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix.egg-info/PKG-INFO +3 -3
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/setup.cfg +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/jax/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/jax/flax_agent.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/jax/flax_evaluator.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/pytorch/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/pytorch/torch_agent.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/pytorch/torch_evaluator.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/tensorflow/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/tensorflow/tf_agent.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/adapters/tensorflow/tf_evaluator.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/flax_ppo.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/tf_dqn.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/tf_ppo.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/tf_ppo_continuous.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/tf_sac.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/tf_td3.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/torch_dqn.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/torch_ppo.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/torch_ppo_continuous.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/torch_rainbow_dqn.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/torch_recurrent_ppo.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/torch_sac.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/algorithms/torch_td3.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/callbacks/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/callbacks/rich_dashboard.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/callbacks/tensorboard_callback.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/callbacks/wandb_callback.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/cli.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/config.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/base_agent.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/base_evaluator.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/base_optimizer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/base_pipeline.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/checkpoint_confirmation.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/checkpoint_registry.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/device.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/diagnostic_controller.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/ensemble_agent.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/her_buffer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/meta_controller.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/noisy_linear.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/normalizers.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/obs_utils.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/policy_manager.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/regime_detector.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/replay_buffer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/resume_state.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/reward_shape.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/trajectory_buffer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/core/types.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/distributed/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/distributed/async_learner.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/distributed/vtrace.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/encoders/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/encoders/obs_encoder.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/encoders/obs_encoder_tf.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/exploration/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/exploration/rnd.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/factory.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ledger/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ledger/callback.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ledger/provenance.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ledger/records.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ledger/schema.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ledger/store.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml/dataset_pipeline.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml/loss_registry.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml/ml_agent.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/adapters/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/adapters/flax_model.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/adapters/tf_model.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/adapters/torch_model.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/lr_schedules.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/metrics.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/metrics_impl/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/metrics_impl/classification.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/metrics_impl/regression.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/ml_core/transfer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/multi_agent/aec_pipeline.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/multi_agent/multi_agent_episode.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/multi_agent/parallel_pipeline.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/multi_agent/seat_env.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/multi_agent/self_play.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/nanonets/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/nanonets/abstention.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/nanonets/features.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/nanonets/pooling.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/nanonets/selector.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/nanonets/smalln.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/agent/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/agent/graph_agent.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/brain_network.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/controller/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/controller/topology_callback.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/controller/topology_controller.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/graph/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/graph/neuron.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/graph/neuron_graph.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/graph/topology_ops.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/hebbian.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/neuromodulator.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/optimizer/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/neuroevo/optimizer/topology_aware_adam.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/optimizers/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/optimizers/adaptive_optimizer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/optimizers/backoff_optimizer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/optimizers/momentum_optimizer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/optimizers/pbt_optimizer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/optimizers/spsa_optimizer.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/orchestrator.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/pipeline/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/pipeline/batch_pipeline.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/pipeline/live_pipeline.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/pipeline/vector_pipeline.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/runtime/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/runtime/baseline.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/runtime/experiment_stage.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/runtime/live_runtime.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/runtime/promote.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/scheduler/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/scheduler/_mp_common.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/scheduler/budget.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/scheduler/dedup.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/scheduler/isolation.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/scheduler/pool.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/scheduler/retry.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/scheduler/worker.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/selection/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/selection/backfill.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/selection/selector.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/selection/uncertainty.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/simple.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/strategy/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/strategy/candidate.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/strategy/comparator.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/strategy/grammar.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/strategy/promotion.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/strategy/runner.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/strategy/worker.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/utils/__init__.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/utils/console.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix/utils/window_size.py +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix.egg-info/SOURCES.txt +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix.egg-info/dependency_links.txt +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix.egg-info/entry_points.txt +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix.egg-info/requires.txt +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tensor_optix.egg-info/top_level.txt +0 -0
- {tensor_optix-2.1.0 → tensor_optix-2.1.1}/tests/test_ml.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tensor-optix
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
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
|
|
@@ -131,8 +131,8 @@ history = model.fit(
|
|
|
131
131
|
)
|
|
132
132
|
print(history.val_metrics[-1].metrics) # {'accuracy': 0.94, 'f1_macro': 0.93, ...}
|
|
133
133
|
|
|
134
|
-
# or let tensor-optix decide when to stop:
|
|
135
|
-
history = model.fit((X_train, y_train), (X_val, y_val)
|
|
134
|
+
# or give no epochs and let tensor-optix decide when to stop:
|
|
135
|
+
history = model.fit((X_train, y_train), (X_val, y_val))
|
|
136
136
|
print(history.stop_reason) # "converged"
|
|
137
137
|
```
|
|
138
138
|
|
|
@@ -60,8 +60,8 @@ history = model.fit(
|
|
|
60
60
|
)
|
|
61
61
|
print(history.val_metrics[-1].metrics) # {'accuracy': 0.94, 'f1_macro': 0.93, ...}
|
|
62
62
|
|
|
63
|
-
# or let tensor-optix decide when to stop:
|
|
64
|
-
history = model.fit((X_train, y_train), (X_val, y_val)
|
|
63
|
+
# or give no epochs and let tensor-optix decide when to stop:
|
|
64
|
+
history = model.fit((X_train, y_train), (X_val, y_val))
|
|
65
65
|
print(history.stop_reason) # "converged"
|
|
66
66
|
```
|
|
67
67
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tensor-optix"
|
|
7
|
-
version = "2.1.
|
|
7
|
+
version = "2.1.1"
|
|
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"
|
|
@@ -61,12 +61,16 @@ class AsyncCallbackAdapter(LoopCallback):
|
|
|
61
61
|
except queue.Empty:
|
|
62
62
|
continue
|
|
63
63
|
try:
|
|
64
|
-
getattr(self._inner, event)
|
|
64
|
+
fn = getattr(self._inner, event, None)
|
|
65
|
+
if fn is not None:
|
|
66
|
+
fn(*args)
|
|
65
67
|
except Exception as e:
|
|
66
68
|
logger.warning(
|
|
67
69
|
"AsyncCallbackAdapter: inner callback %s raised during %s: %s",
|
|
68
70
|
self._inner, event, e,
|
|
69
71
|
)
|
|
72
|
+
finally:
|
|
73
|
+
self._queue.task_done()
|
|
70
74
|
|
|
71
75
|
def _enqueue(self, event: str, *args) -> None:
|
|
72
76
|
try:
|
|
@@ -77,6 +81,7 @@ class AsyncCallbackAdapter(LoopCallback):
|
|
|
77
81
|
# Drop the oldest pending event to make room for this one.
|
|
78
82
|
try:
|
|
79
83
|
self._queue.get_nowait()
|
|
84
|
+
self._queue.task_done()
|
|
80
85
|
with self._lock:
|
|
81
86
|
self._dropped_count += 1
|
|
82
87
|
except queue.Empty:
|
|
@@ -111,6 +116,19 @@ class AsyncCallbackAdapter(LoopCallback):
|
|
|
111
116
|
def on_convergence(self, episode_id, report) -> None:
|
|
112
117
|
self._enqueue("on_convergence", episode_id, report)
|
|
113
118
|
|
|
119
|
+
def consume_dormant_resume(self) -> bool:
|
|
120
|
+
"""
|
|
121
|
+
Synchronous pass-through: the loop needs the answer immediately after
|
|
122
|
+
on_dormant, so a wrapped PolicyManagerCallback can still resume it.
|
|
123
|
+
on_dormant is delivered first so the inner callback has decided.
|
|
124
|
+
"""
|
|
125
|
+
fn = getattr(self._inner, "consume_dormant_resume", None)
|
|
126
|
+
if not callable(fn):
|
|
127
|
+
return False
|
|
128
|
+
if not self._stop.is_set():
|
|
129
|
+
self._queue.join() # wait until on_dormant has run on the worker
|
|
130
|
+
return bool(fn())
|
|
131
|
+
|
|
114
132
|
def on_hyperparam_update(self, old_params, new_params) -> None:
|
|
115
133
|
self._enqueue("on_hyperparam_update", old_params, new_params)
|
|
116
134
|
|
|
@@ -346,7 +346,8 @@ class BackoffScheduler:
|
|
|
346
346
|
|
|
347
347
|
def check_degradation(self, score: float) -> bool:
|
|
348
348
|
"""
|
|
349
|
-
Threshold-based degradation check
|
|
349
|
+
Threshold-based degradation check (standalone use; loops use
|
|
350
|
+
ConvergenceMonitor's collapse detection).
|
|
350
351
|
|
|
351
352
|
Returns True when `score` has dropped significantly below the best
|
|
352
353
|
known score (by more than (1 - degradation_threshold) × |best|).
|