agentsclimarketplace

Sequential two phase training orchestrator

Skill kjuhwa/skills-hub/skills/ml-ops/sequential-two-phase-training-orchestrator

Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.

Install
npx -y skills add kjuhwa/skills-hub --skill sequential-two-phase-training-orchestrator

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Drive a two-phase training pipeline (e.g. tokenizer then predictor) with one command, CLI skip flags, and auto-skip if an earlier phase's best_model already exists.

SKILL.md

4.0 KB, 742 tokens by cl100k_base, as published. Nobody here has run it

One-command orchestrator for multi-phase training with skip/resume

When to use

  • Your pipeline has ordered phases (tokenizer → base model; pretrain → fine-tune; encoder → decoder).
  • Phase N depends on phase N-1's best_model checkpoint.
  • You want --skip-tokenizer, --skip-basemodel, --skip-existing flags so users can rerun only the part they changed.

Pattern

Wrap each phase in a method (train_tokenizer_phase, train_basemodel_phase) that (1) checks os.path.exists(best_model_path) and bails out early if skip_existing is on, (2) sets up its own logger and seed, (3) loads the previous phase's artifact, (4) delegates to the actual training function. A top-level run_training() calls them in order, short-circuits on failure, prints total wall-time, and handles DDP init/teardown once for the whole pipeline. Expose every skip as a CLI flag plus a config boolean.

# finetune_csv/train_sequential.py
class SequentialTrainer:
    def _check_existing_models(self):
        return (os.path.exists(self.config.tokenizer_best_model_path),
                os.path.exists(self.config.basemodel_best_model_path))

    def train_tokenizer_phase(self):
        tok_exists, _ = self._check_existing_models()
        if tok_exists and self.config.skip_existing:
            print("Tokenizer already trained, skipping."); return True
        tokenizer = KronosTokenizer.from_pretrained(self.config.pretrained_tokenizer_path).to(self.device)
        train_tokenizer(tokenizer, self.device, self.config, self.config.tokenizer_save_path, logger)
        return True

    def train_basemodel_phase(self):
        if not os.path.exists(self.config.finetuned_tokenizer_path):
            raise FileNotFoundError("Fine-tuned tokenizer missing — run tokenizer phase first")
        tokenizer = KronosTokenizer.from_pretrained(self.config.finetuned_tokenizer_path).to(self.device)
        model     = Kronos.from_pretrained(self.config.pretrained_predictor_path).to(self.device)
        train_model(model, tokenizer, self.device, self.config, self.config.basemodel_save_path, logger)
        return True

    def run_training(self):
        if self.config.train_tokenizer and not self.train_tokenizer_phase(): return False
        if self.config.train_basemodel and not self.train_basemodel_phase(): return False
        return True

# CLI
parser.add_argument('--skip-tokenizer', action='store_true')
parser.add_argument('--skip-basemodel', action='store_true')
parser.add_argument('--skip-existing',  action='store_true')

Why it works / tradeoffs

One orchestrator script means the invariant "tokenizer before predictor" lives in code, not in a README. CLI skip flags make re-running a single failed phase cheap. The hard guard that phase N verifies phase N-1's artifact catches the common error of running only phase 2 with the wrong pretrained tokenizer path. Tradeoff: coupling phases into one process forbids running them on different machines without refactoring; if that matters, split each phase into its own entry point and have the orchestrator call them via subprocess / Airflow / Make.

References

  • finetune_csv/train_sequential.py in Kronos — SequentialTrainer
  • finetune_csv/config_loader.pyCustomFinetuneConfig._compute_full_paths computes tokenizer_best_model_path, basemodel_best_model_path

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most agent orchestration skills give in 742 tokens

Counted across 742 of the 995 authors here whose files we hold, read 2026-08-07

  • Reference existing artifacts by path or URLin 53 of 742, across 25 files
  • Run the full test suite after integrating changesin 51 of 742, across 19 files
  • Dispatch one agent per independent problem domainin 50 of 742, across 17 files
  • Verify fixes do not conflictin 45 of 742, across 13 files
  • Include a suggested skills section in the documentin 45 of 742, across 17 files
  • Redact sensitive informationin 41 of 742, across 11 files
  • Save to the temporary directory of the operating systemin 39 of 742, across 10 files
  • Tailor the document to user-provided focus argumentsin 39 of 742, across 9 files
  • Spot check agent changes for systematic errorsin 34 of 742, across 7 files
  • Write a handoff document summarising the current conversationin 31 of 742, across 6 files
  • Assign each agent a specific scopein 23 of 742, across 8 files
  • Provide specific scope and clear goalin 23 of 742, across 5 files

Said here and by no other author read

  • wrap each phase in a method
  • check for an existing best model path
  • bail out early if skip existing is on
  • set up a logger and seed per phase
  • load the previous phase artifact
  • delegate to the training function

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.