计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
adversarial【效率与协作】Use Fairlearn adversarial fairness estimators with PyTorch or TensorFlow backends, callbacks, CUDA, and backend-specific troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task asks for neural adversarial unfairness mitigation: AdversarialFairnessClassifier, AdversarialFairnessRegressor, PyTorch, TensorFlow, neural predictor/adversary models, callbacks, dynamic alpha, warm_start, CUDA, or backend import failures.
X, labels y, and row-aligned sensitive_features.backend, model, optimizer, constraint, learning-rate, epoch, batch, callback, and CUDA settings.sensitive_features=....../assessment/, watching for mode collapse, accuracy loss, or unchanged disparity.references/backends-and-training.md for constructor fields, backend selection, model shapes, data preprocessing, callbacks, CUDA, and evaluation.references/troubleshooting.md for missing backends, 2D input errors, invalid activations, BCE range failures, callbacks, and CUDA errors.scripts/smoke_torch_adversarial.py for a tiny explicit-PyTorch-model smoke check with optional CUDA.AdversarialFairnessClassifier(*, backend="auto", predictor_model=None, adversary_model=None, predictor_optimizer="Adam", adversary_optimizer="Adam", constraints="demographic_parity", learning_rate=0.001, alpha=1.0, epochs=1, batch_size=32, shuffle=False, progress_updates=None, skip_validation=False, callbacks=None, cuda=None, warm_start=False, random_state=None)AdversarialFairnessRegressor(...) with the same constructor surface.demographic_parity and equalized_odds.../reductions/ for sklearn-estimator constrained retraining and ../postprocessing/ for threshold adjustment.../installation/ if backend installation is the main task.../datasets/ for Adult/ACS data loading and ../assessment/ for final metric tables.X must be two-dimensional and numeric. One-hot encode categoricals and scale numeric columns before neural training.BCELoss; custom binary predictor/adversary modules should output values in [0, 1], usually with a final torch.nn.Sigmoid().cuda="cuda:0" only after torch.cuda.is_available() is true; otherwise run CPU.CPU PyTorch smoke:
python sub-skills/adversarial/scripts/smoke_torch_adversarial.py
Optional CUDA smoke:
python sub-skills/adversarial/scripts/smoke_torch_adversarial.py --cuda cuda:0