Sequence
int64 1
25.2k
| Time
int64 1
858M
| File
stringclasses 830
values | RangeOffset
int64 0
2.21M
| RangeLength
int64 0
168k
| Text
stringlengths 1
4.7M
⌀ | Language
stringclasses 20
values | Type
stringclasses 9
values |
|---|---|---|---|---|---|---|---|
688
| 1,089,545
|
train_tokenizer.py
| 7,164
| 0
| null |
python
|
selection_command
|
689
| 1,090,222
|
train_tokenizer.py
| 7,165
| 0
| null |
python
|
selection_mouse
|
690
| 1,090,226
|
train_tokenizer.py
| 7,164
| 0
| null |
python
|
selection_command
|
691
| 1,090,282
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
692
| 1,090,986
|
train_tokenizer.py
| 7,117
| 0
| null |
python
|
selection_mouse
|
693
| 1,091,039
|
train_tokenizer.py
| 7,116
| 0
| null |
python
|
selection_command
|
694
| 1,091,395
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
695
| 1,091,721
|
train_tokenizer.py
| 7,165
| 0
| null |
python
|
selection_mouse
|
696
| 1,091,734
|
train_tokenizer.py
| 7,164
| 0
| null |
python
|
selection_command
|
697
| 1,092,405
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
698
| 1,092,525
|
train_tokenizer.py
| 7,117
| 0
| null |
python
|
selection_mouse
|
699
| 1,092,540
|
train_tokenizer.py
| 7,116
| 0
| null |
python
|
selection_command
|
700
| 1,093,339
|
train_tokenizer.py
| 7,165
| 0
| null |
python
|
selection_mouse
|
701
| 1,093,361
|
train_tokenizer.py
| 7,164
| 0
| null |
python
|
selection_command
|
702
| 1,093,368
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
703
| 1,094,468
|
TERMINAL
| 0
| 0
|
[1;264H9[4;60H7[5d7[6d7[50;269H(B[m
| null |
terminal_output
|
704
| 1,094,627
|
train_tokenizer.py
| 7,117
| 0
| null |
python
|
selection_mouse
|
705
| 1,094,631
|
train_tokenizer.py
| 7,116
| 0
| null |
python
|
selection_command
|
706
| 1,095,491
|
TERMINAL
| 0
| 0
|
[1;263H30[4;60H8[5d8[6d8[50;269H(B[m
| null |
terminal_output
|
707
| 1,096,515
|
TERMINAL
| 0
| 0
|
[1;264H1[4;60H9[5d9[6d9[50;269H(B[m
| null |
terminal_output
|
708
| 1,097,514
|
TERMINAL
| 0
| 0
|
[1;264H2[4;59H30[5d40[6d10[50;269H(B[m
| null |
terminal_output
|
709
| 1,098,563
|
TERMINAL
| 0
| 0
|
[1;264H3[4;60H1[5d1[6d1[50;269H(B[m
| null |
terminal_output
|
710
| 1,099,589
|
TERMINAL
| 0
| 0
|
[1;264H4[4;60H2[5d2[6d2[50;269H(B[m
| null |
terminal_output
|
711
| 1,100,713
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
712
| 1,101,638
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
713
| 1,102,634
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
714
| 1,103,664
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
715
| 1,104,723
|
TERMINAL
| 0
| 0
|
[1;264H9[4;60H7[5d7[6d7[50;269H(B[m
| null |
terminal_output
|
716
| 1,105,738
|
TERMINAL
| 0
| 0
|
[1;263H40[4;60H8[5d8[6d8[50;269H(B[m
| null |
terminal_output
|
717
| 1,106,762
|
TERMINAL
| 0
| 0
|
[1;264H1[4;60H9[5d9[6d9[50;269H(B[m
| null |
terminal_output
|
718
| 1,107,784
|
TERMINAL
| 0
| 0
|
[1;264H2[4;59H40[5d50[6d20[50;269H(B[m
| null |
terminal_output
|
719
| 1,108,810
|
TERMINAL
| 0
| 0
|
[1;264H3[4;60H1[5d1[6d1[50;269H(B[m
| null |
terminal_output
|
720
| 1,109,928
|
TERMINAL
| 0
| 0
|
[1;264H4[4;60H2[5d2[6d2[50;269H(B[m
| null |
terminal_output
|
721
| 1,110,953
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
722
| 1,111,984
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
723
| 1,113,001
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
724
| 1,114,029
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
725
| 1,114,994
|
TERMINAL
| 0
| 0
|
[1;264H9[4;60H7[5d7[6d7[50;269H(B[m
| null |
terminal_output
|
726
| 1,116,024
|
TERMINAL
| 0
| 0
|
[1;263H50[4;60H8[5d8[6d8[50;269H(B[m
| null |
terminal_output
|
727
| 1,117,052
|
TERMINAL
| 0
| 0
|
[1;264H1[4;60H9[5d9[6d9[50;269H(B[m
| null |
terminal_output
|
728
| 1,118,121
|
TERMINAL
| 0
| 0
|
[1;264H2[4;59H50[5;57H9:00[6d30[50;269H(B[m
| null |
terminal_output
|
729
| 1,119,146
|
TERMINAL
| 0
| 0
|
[1;264H3[4;60H2[5d2[6d2[50;269H(B[m
| null |
terminal_output
|
730
| 1,120,168
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
731
| 1,121,297
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
732
| 1,122,320
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
733
| 1,123,344
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
734
| 1,124,277
|
TERMINAL
| 0
| 0
|
[1;264H9[4;60H7[5d7[6d7[50;269H(B[m
| null |
terminal_output
|
735
| 1,125,311
|
TERMINAL
| 0
| 0
|
[1;261H8:00[4;60H8[5d8[6d8[50;269H(B[m
| null |
terminal_output
|
736
| 1,126,339
|
TERMINAL
| 0
| 0
|
[1;264H1[4;60H9[5d9[6d9[50;269H(B[m
| null |
terminal_output
|
737
| 1,127,377
|
TERMINAL
| 0
| 0
|
[1;264H2[4;57H1:00[5d10[6d40[50;269H(B[m
| null |
terminal_output
|
738
| 1,127,965
|
TERMINAL
| 0
| 0
|
bash
| null |
terminal_focus
|
739
| 1,128,401
|
TERMINAL
| 0
| 0
|
[1;264H3[4;60H1[5d1[6d1[50;269H(B[m
| null |
terminal_output
|
740
| 1,129,432
|
TERMINAL
| 0
| 0
|
[1;264H4[4;60H2[5d2[6d2[50;269H(B[m
| null |
terminal_output
|
741
| 1,130,486
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
742
| 1,130,790
|
TERMINAL
| 0
| 0
|
git branch
| null |
terminal_command
|
743
| 1,130,828
|
TERMINAL
| 0
| 0
|
[?25l[?2004l\r]633;E;git branch;615630df-1408-4f83-a653-db85cec28959]633;C[?25h[?1h=\r fix-autoreg-sampling[m[m\r\n log-time-train-step[m[m\r\n* [32mmain[m[m\r\n quickfix-all-gather-induced-idling[m[m\r\n seeded-episode-sampling[m[m\r\n\r[K[?1l>
| null |
terminal_output
|
744
| 1,131,488
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
745
| 1,132,524
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
746
| 1,133,583
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
747
| 1,133,902
|
utils/dataloader.py
| 0
| 0
|
import functools\nimport jax\n\nimport tensorflow as tf\n\n\n# --- TensorFlow function for processing: slicing, normalization ---\ndef _tf_process_episode(episode_tensor, seq_len, image_h, image_w, image_c, seed):\n """\n Processes a raw episode tensor in TensorFlow.\n Takes a full episode, extracts a random sequence, and normalizes it.\n Args:\n episode_tensor: A TensorFlow tensor representing a full video episode.\n Expected shape: (dynamic_length, image_h, image_w, image_c)\n Expected dtype: e.g., tf.uint8 (raw pixel values)\n seq_len: The desired length of the sub-sequence to extract.\n image_h: The height of each frame.\n image_w: The width of each frame.\n image_c: The number of channels in each frame.\n seed: An integer seed for random operations to ensure reproducibility.\n Returns:\n A TensorFlow tensor representing the processed video sequence.\n Shape: (seq_len, image_h, image_w, image_c)\n Dtype: tf.float32 (normalized pixel values)\n """\n current_episode_len = tf.shape(episode_tensor)[0]\n\n max_start_idx = current_episode_len - seq_len\n\n start_idx = tf.random.uniform(\n shape=(), minval=0, maxval=max_start_idx + 1, dtype=tf.int32, seed=seed\n )\n\n seq = episode_tensor[start_idx : start_idx + seq_len]\n\n seq = tf.cast(seq, tf.float32) / 255.0\n\n # Ensure the final shape is statically known for batching.\n # tf.reshape is robust, but tf.ensure_shape or set_shape can also be used if confident.\n processed_sequence = tf.reshape(seq, [seq_len, image_h, image_w, image_c])\n\n return processed_sequence\n\n\ndef _parse_tfrecord_fn(example_proto, image_h, image_w, image_c):\n feature_description = {\n "height": tf.io.FixedLenFeature([], tf.int64),\n "width": tf.io.FixedLenFeature([], tf.int64),\n "channels": tf.io.FixedLenFeature([], tf.int64),\n "sequence_length": tf.io.FixedLenFeature([], tf.int64),\n "raw_video": tf.io.FixedLenFeature([], tf.string),\n }\n example = tf.io.parse_single_example(example_proto, feature_description)\n\n video_shape = (example["sequence_length"], image_h, image_w, image_c)\n\n episode_tensor = tf.io.decode_raw(example["raw_video"], out_type=tf.uint8)\n episode_tensor = tf.reshape(episode_tensor, video_shape)\n\n episode_tensor = tf.ensure_shape(episode_tensor, [None, image_h, image_w, image_c])\n return episode_tensor\n\n\ndef get_dataloader(\n tfrecord_paths: list[str], # List of TFRecord file paths\n seq_len: int,\n global_batch_size: int,\n image_h: int,\n image_w: int,\n image_c: int,\n shuffle_buffer_size: int = 1000,\n shuffle_window_size: int = 20,\n num_parallel_calls: int = tf.data.AUTOTUNE,\n cache_processed_data: bool = False,\n seed: int = 42,\n):\n """\n Creates a tf.data.Dataset pipeline from TFRecord files.\n """\n if not tfrecord_paths:\n raise ValueError("tfrecord_paths list cannot be empty.")\n\n process_id = jax.process_index()\n num_processes = jax.process_count()\n\n assert global_batch_size % num_processes == 0, "Global batch size {global_batch_size} \\n must be divisible by the number of JAX processes {num_processes} for proper sharding."\n per_process_batch_size = global_batch_size // num_processes\n\n dataset = tf.data.TFRecordDataset(\n tfrecord_paths, num_parallel_reads=tf.data.AUTOTUNE\n )\n \n dataset = dataset.shard(num_shards=num_processes, index=process_id)\n\n parse_fn = functools.partial(\n _parse_tfrecord_fn, image_h=image_h, image_w=image_w, image_c=image_c\n )\n dataset = dataset.map(parse_fn, num_parallel_calls=num_parallel_calls)\n\n dataset = dataset.cache() if cache_processed_data else dataset\n\n tf_process_fn = functools.partial(\n _tf_process_episode,\n seq_len=seq_len,\n image_h=image_h,\n image_w=image_w,\n image_c=image_c,\n seed=seed\n )\n dataset = dataset.map(tf_process_fn, num_parallel_calls=num_parallel_calls)\n\n # (f.srambical) NOTE: For TFRecords, it's often good to have a large shuffle buffer.\n shuffle_buffer_size = min(shuffle_buffer_size, len(tfrecord_paths) // num_processes)\n # Windowed shuffling\n dataset = dataset.window(size=shuffle_window_size, shift=shuffle_window_size, drop_remainder=True)\n dataset = dataset.flat_map(lambda window: window.shuffle(buffer_size=shuffle_buffer_size, seed=seed, reshuffle_each_iteration=False))\n\n dataset = dataset.repeat(None)\n dataset = dataset.batch(per_process_batch_size, drop_remainder=True)\n dataset = dataset.prefetch(tf.data.AUTOTUNE)\n\n return dataset.as_numpy_iterator()\n
|
python
|
tab
|
748
| 1,134,656
|
TERMINAL
| 0
| 0
|
[1;264H9[4;60H7[5d7[6d7[50;269H(B[m
| null |
terminal_output
|
749
| 1,135,585
|
TERMINAL
| 0
| 0
|
[1;263H10[4;60H8[5d8[6d8[50;269H(B[m
| null |
terminal_output
|
750
| 1,136,612
|
TERMINAL
| 0
| 0
|
[1;264H1[4;60H9[5d9[6d9[50;269H(B[m
| null |
terminal_output
|
751
| 1,137,648
|
TERMINAL
| 0
| 0
|
[1;264H2[4;59H10[5d20[6d50[50;269H(B[m
| null |
terminal_output
|
752
| 1,138,635
|
train_tokenizer.py
| 0
| 0
| null |
python
|
tab
|
753
| 1,138,779
|
TERMINAL
| 0
| 0
|
[1;264H3[4;60H1[5d1[6d1[50;269H(B[m
| null |
terminal_output
|
754
| 1,139,724
|
TERMINAL
| 0
| 0
|
[1;264H4[4;60H2[5d2[6d2[50;269H(B[m
| null |
terminal_output
|
755
| 1,140,772
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
756
| 1,141,755
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
757
| 1,142,820
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
758
| 1,143,882
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
759
| 1,145,046
|
TERMINAL
| 0
| 0
|
[1;264H9[4;60H7[5d7[6d7[50;269H(B[m
| null |
terminal_output
|
760
| 1,145,937
|
TERMINAL
| 0
| 0
|
[1;263H20[4;60H8[5d8[6d8[50;269H(B[m
| null |
terminal_output
|
761
| 1,146,998
|
TERMINAL
| 0
| 0
|
[1;264H1[4;60H9[5d9[6d9[50;269H(B[m
| null |
terminal_output
|
762
| 1,147,947
|
TERMINAL
| 0
| 0
|
[1;264H2[4;59H20[5d30[6;57H6:00[50;269H(B[m
| null |
terminal_output
|
763
| 1,148,962
|
TERMINAL
| 0
| 0
|
[1;264H3[4;60H1[5d1[6d1[50;269H(B[m
| null |
terminal_output
|
764
| 1,150,104
|
TERMINAL
| 0
| 0
|
[1;264H4[4;60H2[5d2[6d2[50;269H(B[m
| null |
terminal_output
|
765
| 1,151,095
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
766
| 1,152,120
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
767
| 1,153,079
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
768
| 1,154,169
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
769
| 1,155,134
|
TERMINAL
| 0
| 0
|
[1;263H30[4;60H8[5d8[6d8[50;269H(B[m
| null |
terminal_output
|
770
| 1,156,214
|
TERMINAL
| 0
| 0
|
[1;264H1[4;60H9[5d9[6d9[50;269H(B[m
| null |
terminal_output
|
771
| 1,157,239
|
TERMINAL
| 0
| 0
|
[1;264H2[4;59H30[5d40[6d10[50;269H(B[m
| null |
terminal_output
|
772
| 1,158,207
|
TERMINAL
| 0
| 0
|
[1;264H3[4;60H1[5d1[6d1[50;269H(B[m
| null |
terminal_output
|
773
| 1,159,231
|
TERMINAL
| 0
| 0
|
[1;264H4[4;60H2[5d2[6d2[50;269H(B[m
| null |
terminal_output
|
774
| 1,160,262
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
775
| 1,161,335
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
776
| 1,162,358
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
777
| 1,163,342
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
778
| 1,164,406
|
TERMINAL
| 0
| 0
|
[1;264H9[4;60H7[5d7[6d7[50;269H(B[m
| null |
terminal_output
|
779
| 1,165,431
|
TERMINAL
| 0
| 0
|
[1;263H40[4;60H8[5d8[6d8[50;269H(B[m
| null |
terminal_output
|
780
| 1,166,430
|
TERMINAL
| 0
| 0
|
[1;264H1[4;60H9[5d9[6d9[50;269H(B[m
| null |
terminal_output
|
781
| 1,167,466
|
TERMINAL
| 0
| 0
|
[1;264H2[4;59H40[5d50[6d20[50;269H(B[m
| null |
terminal_output
|
782
| 1,168,488
|
TERMINAL
| 0
| 0
|
[1;264H3[4;60H1[5d1[6d1[50;269H(B[m
| null |
terminal_output
|
783
| 1,169,525
|
TERMINAL
| 0
| 0
|
[1;264H4[4;60H2[5d2[6d2[50;269H(B[m
| null |
terminal_output
|
784
| 1,170,552
|
TERMINAL
| 0
| 0
|
[1;264H5[4;60H3[5d3[6d3[50;269H(B[m
| null |
terminal_output
|
785
| 1,171,677
|
TERMINAL
| 0
| 0
|
[1;264H6[4;60H4[5d4[6d4[50;269H(B[m
| null |
terminal_output
|
786
| 1,172,616
|
TERMINAL
| 0
| 0
|
[1;264H7[4;60H5[5d5[6d5[50;269H(B[m
| null |
terminal_output
|
787
| 1,173,725
|
TERMINAL
| 0
| 0
|
[1;264H8[4;60H6[5d6[6d6[50;269H(B[m
| null |
terminal_output
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.