fix: macOS symlink compatibility + rename config to ~/.llm_config.sh#1
Open
JewelRoam wants to merge 5 commits into
Open
fix: macOS symlink compatibility + rename config to ~/.llm_config.sh#1JewelRoam wants to merge 5 commits into
JewelRoam wants to merge 5 commits into
Conversation
…ibility On macOS, Path.resolve() returns /private/var/... while raw tmpdir paths use /var/..., causing os.path.relpath to compute broken relative symlinks. Apply os.path.realpath to both source and destination before computing the relative path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # demo/auto-encoder/claude.py # demo/auto-encoder/loop_run.py
YqGe585
added a commit
to YqGe585/Experience
that referenced
this pull request
Apr 29, 2026
…d-accum progress - TODO lixinqi#1: marked completed with commit reference and implementation summary - TODO lixinqi#2 forward first item: added implementation details, verification results (mean loss -22.4%, relevance +2.27pp on deep-mask samples), and notes on the three accompanying bug fixes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
YqGe585
added a commit
to YqGe585/Experience
that referenced
this pull request
Apr 29, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
YqGe585
added a commit
to YqGe585/Experience
that referenced
this pull request
Apr 29, 2026
Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
YqGe585
added a commit
to YqGe585/Experience
that referenced
this pull request
May 7, 2026
- Add prepare_dataset_index.py: one-shot script to build a reproducible file-level 80/20 train/eval split with three mask strategies (short 1-3 lines, long 4-8 lines, structural via AST function-body detection). Generates dataset_index/ with 332 train and 82 eval samples across 65 source files; train/eval file sets are fully disjoint. - Update prepare_worktrees.py: add split="train"|"eval" and dataset_index_dir params. When split is given, samples are loaded from the pre-generated index (seeded random.sample) instead of being masked at runtime. Legacy split=None path is unchanged. - Update test_harness.py: add --split and --dataset-index-dir CLI args; add _compute_extra_metrics() reporting AST pass rate, Exact Match rate, and per-mask-type stratified loss after each evaluation run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
YqGe585
added a commit
to YqGe585/Experience
that referenced
this pull request
May 7, 2026
Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
仓库里接口是 OpenAI 格式,并非Anthropic Messages API,叫 .anthropic.sh 有误导;另外加了个 realpath 修复。
Summary
os.path.relpathin symlink mode to fix macOS/var→/private/varpath resolution~/.anthropic.sh→~/.llm_config.shacross all filesProblem
Symlink bug on macOS
make_tensor(..., symlink=True)computes relative symlink paths with mismatched resolution:On macOS,
/varis a symlink to/private/var. The prefix mismatch causesos.path.relpathto produce incorrect relative paths, resulting inFileNotFoundError: /private/private/var/...when downstream code callsos.path.realpath()to follow the symlink chain.Config file naming
The LLM config variables (
LLM_API_KEY,LLM_BASE_URL,LLM_MODEL) are provider-agnostic and use OpenAI-compatible API format. Naming the config file~/.anthropic.shis misleading. Renamed to~/.llm_config.shto accurately reflect its purpose.Fix
Test
make_tensorself-tests pass (including symlink mode)slice_viewself-tests pass (depends onmake_tensorsymlink mode)_copy_back_to_storage_viewinst_moe_forwardnow resolves paths correctly