You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@copilot rewrite learner.py to remove all points where I am manipulating on device tensors / arrays outside of train_step (which is jitted). I dont want to spend any wasted time moving these around. Track these variables another way without having to rely on the output of the train_step
@copilot rewrite learner.py to remove all points where I am manipulating on device tensors / arrays outside of train_step (which is jitted). I dont want to spend any wasted time moving...
train_step (jitted): Removed step_count and frame_count increments from both player and builder state .replace() calls, and removed training_step/player_frame_count/builder_frame_count from the returned logs dict.
Learner class: Added self.step_count, self.player_frame_count, self.builder_frame_count as plain Python ints (initialized once from state at __init__). Frame increments are computed from the numpy batch beforedevice_put. All host-side logic (_handle_periodic_tasks, _should_add_new_player, _create_params_container, league management) now uses these counters directly — zero device-to-host transfers during training.
Also removed the check_finite_loss block that was calling jnp.isfinite().item(), and added _save_checkpoint() helper that injects host counters into the state only at save time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.