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
| #!/usr/bin/env python3 | |
| """Reproducible transform for: reorder RolloutManager methods and privatize some names. | |
| Run from the repo root: python3 /tmp/transform_reorder_rollout_manager.py | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.append(".claude/skills/mechanical-refactor-verify") | |
| from mechanical_refactor_verify_utils import verify_mechanical_refactor, git_add_and_commit |
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
| #!/usr/bin/env python3 | |
| """Reproducible transform for: extract postprocess_rollout_data and _compute_dynamic_global_batch_size | |
| from RolloutManager in rollout_manager.py into new rollout_data_conversion.py | |
| Run from the repo root: python3 /tmp/transform_extract_rollout_data_conversion.py | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.append(".claude/skills/mechanical-refactor-verify") |
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
| #!/usr/bin/env python3 | |
| """Reproducible transform for: split miles/ray/rollout.py into miles/ray/rollout/ package | |
| Run from the repo root: python3 /tmp/transform_rollout_split.py | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.append(".claude/skills/mechanical-refactor-verify") | |
| from mechanical_refactor_verify_utils import verify_mechanical_refactor, exec_command, git_add_and_commit, dedent |
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
| #!/usr/bin/env python3 | |
| """Reproducible transform for: split miles/ray/rollout.py into miles/ray/rollout/ package | |
| Run from the repo root: python3 transform.py | |
| """ | |
| import sys | |
| import textwrap | |
| from pathlib import Path | |
| sys.path.append(".claude/skills/mechanical-refactor-verify") |
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
| import gzip | |
| import re | |
| from pathlib import Path | |
| from typing import List, Optional | |
| import orjson | |
| import typer | |
| def merge_chrome_traces(interesting_paths: List[Path], output_path: Path, start_time_ms: int, end_time_ms: int): |
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
| use std::sync::{Arc, RwLock}; | |
| // ----------------------------------------------------------------------------------------- | |
| // Suppose we have such user code | |
| pub struct One(String); | |
| impl One { | |
| fn f(&self) -> Two { | |
| // users can put arbitrarily complex computation here |
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
| Compiling bug v0.1.0 (/Users/tom/temp/bug) | |
| error[E0277]: the type `UnsafeCell<runtime::blocking::pool::Shared>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | |
| --> src/main.rs:7:42 | |
| | | |
| 7 | let _ = std::panic::catch_unwind(|| { | |
| | _________________------------------------_^ | |
| | | | | |
| | | required by a bound introduced by this call | |
| 8 | | rt.spawn(my_background_op()); // FAIL TO COMPILE | |
| 9 | | tokio::spawn(my_background_op()); // OK |
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
| import 'dart:async'; | |
| import 'dart:math'; | |
| import 'package:common_flutter/ui/services/navigator_ui_service.dart'; | |
| import 'package:common_flutter/utils/colors.dart'; | |
| import 'package:flutter/gestures.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:front_log/front_log.dart'; | |
| class PopGestureWidget extends StatefulWidget { |
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
| import warnings | |
| from collections import UserDict, defaultdict | |
| from typing import Optional, Tuple, Any | |
| import torch | |
| from transformers import BeamScorer, BeamSearchScorer | |
| from transformers.generation import BeamHypotheses | |
| from ...utils.torch_utils import first_several_nonzero_indices |
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
| import 'dart:async'; | |
| import 'dart:developer'; | |
| import 'dart:io'; | |
| import 'dart:isolate'; | |
| import 'package:common_dart/utils/processes.dart'; | |
| import 'package:front_log/front_log.dart'; | |
| import 'package:test/test.dart'; | |
| import 'package:vm_service/vm_service.dart' hide Isolate, Log; | |
| import 'package:vm_service/vm_service.dart' as vm_service; |
NewerOlder