计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
training-evaluation-and-tuning【效率与协作】Run, evaluate, tune, reload, compare, and troubleshoot RecBole experiments with safe CPU-first workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user asks how to run or troubleshoot RecBole experiments after the model and dataset/config choices are known. It covers one-model train/evaluate jobs, API smoke tests, grouped model comparisons, checkpoints and save/load, case-study scoring, HyperTuning/Hyperopt/Ray, statistical significance, and CPU/GPU/distributed runtime choices.
run_recbole config", or "make a one-epoch CPU smoke test".hyper.test file", "why did Ray tuning fail?".nproc/world_size/ip/port/group_offset mean?".load_col, dataset acquisition, or data_path layout details: route to ../configuration-and-data/.../models-and-customization/.RecBole exposes these stable routes for this skill:
from recbole.quick_start import run, run_recbole, objective_function, load_data_and_model
run(model, dataset, config_file_list=None, config_dict=None, saved=True,
nproc=1, world_size=-1, ip='localhost', port='5678', group_offset=0)
run_recbole(model=None, dataset=None, config_file_list=None, config_dict=None,
saved=True, queue=None)
objective_function(config_dict=None, config_file_list=None, saved=True)
load_data_and_model(model_file)
At trainer level, the reference methods are:
Trainer.fit(train_data, valid_data=None, verbose=True, saved=True,
show_progress=False, callback_fn=None)
Trainer.evaluate(eval_data, load_best_model=True, model_file=None,
show_progress=False)
For a bounded CPU smoke test, prefer:
use_gpu: Falseepochsshow_progress: Falsesaved=False when no checkpoint is neededcheckpoint_dir when saved=TrueUse the bundled wrapper first when the user wants an executable safe starting point:
python scripts/recbole_train_eval_smoke.py --dry-run-config
python scripts/recbole_train_eval_smoke.py --run --model BPR --dataset ml-100k --epochs 1 --work-dir ./recbole-runs/bpr-smoke
The wrapper imports installed RecBole from the active Python environment and does not rely on a repository checkout.
scripts/recbole_train_eval_smoke.py: CPU-first one-model wrapper around run / run_recbole; no training side effects unless --run is passed.scripts/recbole_hyperopt_template.py: writes and validates HyperTuning parameter files; optional tiny Hyperopt run only with --run.scripts/recbole_save_load_recipe.py: validates a checkpoint path, prints the load/case-study API sequence, and can execute top-k scoring for supplied users.show_progress=False, saved=False, and a non-checkout --work-dir.best_valid_score, valid_score_bigger, best_valid_result, and test_result. objective_function additionally returns model.saved=True plus checkpoint_dir, optionally save_dataset=True and save_dataloaders=True, then reload with load_data_and_model(model_file).dataset.token2id, run full_sort_scores or full_sort_topk, and convert item ids back with dataset.id2token.algo='random'/low max_evals unless the user explicitly wants exhaustive search.data_path and absolute fixed config file paths because Ray changes worker working directories.Future verification should include at least these synthetic usability cases:
data_path after Ray changes the working directory to local_dir.