Skip to content

Core reorg#2

Merged
haizhongzheng merged 3 commits into
mainfrom
core-reorg
May 23, 2026
Merged

Core reorg#2
haizhongzheng merged 3 commits into
mainfrom
core-reorg

Conversation

@haizhongzheng
Copy link
Copy Markdown
Member

Merge: core-reorg → main

Summary

Groups three cross-cutting subpackages under a shared astraflow.core namespace and removes a dead vendored copy of the ASearcher Python tree. No logic changes to live code paths; one
path-relative bug introduced by the move is fixed in the same branch.

Changes

  1. refactor: group config, weight_manager, workflow under astraflow.core (a8a0a7c)
  • Move astraflow/{config,weight_manager,workflow}/ → astraflow/core//
  • Mechanical import sweep across the package, docs, and AGENTS.md
  • New astraflow/core/init.py documents the group's role vs. the engine packages (raas, train_worker, dataflow)
  1. fix: correct path-relative computations in moved verifier helpers (6939aaf)
  • The added directory level broke three file-relative helpers:
    • _repo_root() in livecodebench_reward.py, human_eval_reward.py, code_execution_mraas.py — parents[3] → parents[4]
    • _verifier_script_path() in livecodebench_reward.py, code_execution_mraas.py — hardcoded "workflow" segment → "core"/"workflow"
  • Symptom: code / livecodebench / human_eval reward subprocesses ran with a non-existent script path, returned rc=2, all rewards became 0.0, m-1 filter dropped every group, trainer stuck
    at step 0. Math / multi-agent / greso / alfworld recipes were unaffected (no subprocess verifier).
  1. chore: delete dead Python tree under astraEnv/ASearcher (ccae8a9)
  • Remove astraEnv/ASearcher/ASearcher/ and astraEnv/ASearcher/agent/ — vendored upstream snapshots whose logic now lives in astraflow/core/workflow/impl/asearcher/. They had unconditional
    astraflow imports, creating a backwards layering edge from astraEnv into astraflow.
  • Kept (verified live): scripts/, tools/, utils/, evaluation/, plus user-facing configs/, demo/, docs/, assets/, qa_synthesis/.
  • Net effect: astraEnv is now a pure scripts/assets directory.

Risk / compatibility

  • Import paths changed. Anything outside this branch that imports astraflow.config, astraflow.weight_manager, or astraflow.workflow will need to switch to astraflow.core.*. Worth a grep of
    any in-flight branches before merging.
  • Subprocess-verifier recipes were silently broken by the move before the fix landed; if anyone branched off core-reorg between a8a0a7c and 6939aaf, they need to pick up the fix.
  • No checkpoint, config, or data-format changes.

Test plan

  • math recipe smoke (unaffected path)
  • code recipe smoke — exercises livecodebench_reward / human_eval_reward subprocess path that was broken pre-fix
  • ASearcher / search recipe smoke — confirms the astraEnv cleanup didn't remove anything live
  • python -c "import astraflow" and import astraflow.core.{config,weight_manager,workflow}

Move three cross-cutting subpackages into a shared astraflow/core/
namespace to distinguish them from the engine packages (raas,
train_worker, dataflow). Pure rename + mechanical import sweep,
no logic changes:

- astraflow/{config,weight_manager,workflow}/ -> astraflow/core/<same>/
- import paths updated across the package, docs, and AGENTS.md
- new astraflow/core/__init__.py documents the group's role
- astraflow/__init__.py comment clarifies the dataflow re-export
The reorg of workflow/ under core/ added one directory level. Three
helpers that compute paths from __file__ still assumed the pre-reorg
depth:

- _repo_root() in livecodebench_reward.py, human_eval_reward.py, and
  code_execution_mraas.py used parents[3], which now lands on the
  package root instead of the repo root; fix to parents[4]
- _verifier_script_path() in livecodebench_reward.py and
  code_execution_mraas.py hardcoded "workflow" path-segments; fix to
  "core"/"workflow"

Symptom: code/livecodebench/human_eval reward subprocesses launched
with a non-existent script path, returned rc=2, and the reward fn
caught FileNotFoundError and returned [-4]. All rewards came out 0.0,
the m-1 filter dropped every rollout group, and the trainer sat at
step 0. Other recipes (math, multi-agent, greso, alfworld) weren't
affected because they don't go through the subprocess verifier.
The astraEnv/ASearcher/ASearcher/ subtree and astraEnv/ASearcher/agent/
were vendored upstream snapshots that duplicated logic now living in
astraflow/core/workflow/impl/asearcher/. Nothing in the live code path
(search recipe, examples, in-package workflows, RAG server scripts)
loaded them, but their unconditional astraflow imports created a
backwards layering edge from astraEnv into astraflow.

Kept (verified live via examples/search/ and astraEnv/ASearcher/scripts/):
- scripts/  - RAG server launchers
- tools/    - local_retrieval_server.py invoked by scripts
- utils/    - index_builder.py invoked by build_index.sh
- evaluation/ - config_loader imported by tools/search_utils.py
- configs/, demo/, docs/, assets/, qa_synthesis/ - user-facing assets

astraEnv is now a pure scripts/assets directory with no Python
reaching back into astraflow.
@haizhongzheng haizhongzheng merged commit 9427f2b into main May 23, 2026
1 check failed
@haizhongzheng haizhongzheng deleted the core-reorg branch May 23, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant