Files
OrpaonVision/OrpaonVision.Core/Training/Contracts/Commands/SubmitTrainingJobCommand.cs
2026-04-06 22:04:05 +08:00

83 lines
1.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace OrpaonVision.Core.Training.Contracts.Commands;
/// <summary>
/// 提交训练任务命令。
/// </summary>
public sealed class SubmitTrainingJobCommand
{
/// <summary>
/// 训练任务名称。
/// </summary>
public string Name { get; init; } = string.Empty;
/// <summary>
/// 训练任务描述。
/// </summary>
public string Description { get; init; } = string.Empty;
/// <summary>
/// 数据集版本ID。
/// </summary>
public Guid DatasetVersionId { get; init; }
/// <summary>
/// 训练算法类型。
/// </summary>
public string AlgorithmType { get; init; } = string.Empty;
/// <summary>
/// 训练参数JSON
/// </summary>
public string TrainingParametersJson { get; init; } = string.Empty;
/// <summary>
/// 总轮次。
/// </summary>
public int TotalEpochs { get; init; } = 100;
/// <summary>
/// 批次大小。
/// </summary>
public int BatchSize { get; init; } = 16;
/// <summary>
/// 学习率。
/// </summary>
public decimal LearningRate { get; init; } = 0.001m;
/// <summary>
/// 早停轮次。
/// </summary>
public int EarlyStoppingPatience { get; init; } = 10;
/// <summary>
/// 保存间隔轮次。
/// </summary>
public int SaveIntervalEpochs { get; init; } = 10;
/// <summary>
/// 验证间隔轮次。
/// </summary>
public int ValidationIntervalEpochs { get; init; } = 1;
/// <summary>
/// 是否启用混合精度。
/// </summary>
public bool EnableMixedPrecision { get; init; } = false;
/// <summary>
/// GPU设备ID。
/// </summary>
public int GpuDeviceId { get; init; } = 0;
/// <summary>
/// 随机种子。
/// </summary>
public int? RandomSeed { get; init; }
/// <summary>
/// 创建者。
/// </summary>
public string CreatedBy { get; init; } = string.Empty;
}