TrainingConfig
public class TrainingConfig
io/agentscope/core/training/runner/TrainingConfig.java:36–259Training 配置,保存相关配置项。位于 io.agentscope.core.training.runner 包。核心成员包括 builder、getTrinityEndpoint、getTrinityApiKey、getModelName、getSelectionStrategy、getRewardCalculator。
Configuration for Training Runner.
Configures various parameters for the training process, including Trinity service address, training model, selection strategy, reward calculator, etc.
Automated design:
-
Task ID and Run ID are fully managed automatically by the system
-
Users don't need to worry about task tracking details
-
Supports flexible training request filtering strategies
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.core.training.runner that evaluates agent behaviour and records tracing and telemetry data. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static Builder builder()static | 返回构建器实例。 Returns the builder. |
public String getTrinityEndpoint() | 获取 `getTrinityEndpoint`。 Returns the trinity endpoint. |
public String getTrinityApiKey() | 获取 `getTrinityApiKey`。 Returns the trinity api key. |
public String getModelName() | 获取模型名称。 Returns the model name. |
public TrainingSelectionStrategy getSelectionStrategy() | 获取 `getSelectionStrategy`。 Returns the selection strategy. |
public RewardCalculator getRewardCalculator() | 获取 `getRewardCalculator`。 Returns the reward calculator. |
public long getCommitIntervalSeconds() | 获取提交间隔秒。 Returns the commit interval seconds. |
public Duration getHttpTimeout() | 获取HTTP 超时。 Returns the http timeout. |
public boolean isEnableAutoCommit() | 判断是否 `isEnableAutoCommit`。 Returns whether the enable auto commit. |
public int getShadowPoolSize() | 获取 `getShadowPoolSize`。 Returns the shadow pool size. |
public int getShadowPoolCapacity() | 获取 `getShadowPoolCapacity`。 Returns the shadow pool capacity. |
public int getRepeatTime() | 获取 `getRepeatTime`。 Returns the repeat time. |
public double getSampleRate() | 获取 `getSampleRate`。 Get current sampling rate |
方法详情Method Detail
builder
public static Builder builder()
返回构建器实例。
Returns the builder.
Builderio/agentscope/core/training/runner/TrainingConfig.java:65–67getTrinityEndpoint
public String getTrinityEndpoint()
获取 getTrinityEndpoint。
Returns the trinity endpoint.
Stringio/agentscope/core/training/runner/TrainingConfig.java:69–71getTrinityApiKey
public String getTrinityApiKey()
获取 getTrinityApiKey。
Returns the trinity api key.
Stringio/agentscope/core/training/runner/TrainingConfig.java:73–75getModelName
public String getModelName()
获取模型名称。
Returns the model name.
Stringio/agentscope/core/training/runner/TrainingConfig.java:77–79getSelectionStrategy
public TrainingSelectionStrategy getSelectionStrategy()
获取 getSelectionStrategy。
Returns the selection strategy.
TrainingSelectionStrategyio/agentscope/core/training/runner/TrainingConfig.java:81–83getRewardCalculator
public RewardCalculator getRewardCalculator()
获取 getRewardCalculator。
Returns the reward calculator.
RewardCalculatorio/agentscope/core/training/runner/TrainingConfig.java:85–87getCommitIntervalSeconds
public long getCommitIntervalSeconds()
获取提交间隔秒。
Returns the commit interval seconds.
longio/agentscope/core/training/runner/TrainingConfig.java:89–91getHttpTimeout
public Duration getHttpTimeout()
获取HTTP 超时。
Returns the http timeout.
Durationio/agentscope/core/training/runner/TrainingConfig.java:93–95isEnableAutoCommit
public boolean isEnableAutoCommit()
判断是否 isEnableAutoCommit。
Returns whether the enable auto commit.
booleanio/agentscope/core/training/runner/TrainingConfig.java:97–99getShadowPoolSize
public int getShadowPoolSize()
获取 getShadowPoolSize。
Returns the shadow pool size.
intio/agentscope/core/training/runner/TrainingConfig.java:101–103getShadowPoolCapacity
public int getShadowPoolCapacity()
获取 getShadowPoolCapacity。
Returns the shadow pool capacity.
intio/agentscope/core/training/runner/TrainingConfig.java:105–107getRepeatTime
public int getRepeatTime()
获取 getRepeatTime。
Returns the repeat time.
intio/agentscope/core/training/runner/TrainingConfig.java:109–111getSampleRate
public double getSampleRate()
获取 getSampleRate。
Get current sampling rate
doubleio/agentscope/core/training/runner/TrainingConfig.java:118–123嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.core.training.runner 包。核心成员包括 trinityEndpoint、trinityApiKey、modelName、selectionStrategy、sampleRate、rewardCalculator。
A class in io.agentscope.core.training.runner that evaluates agent behaviour and records tracing and telemetry data. Declared in io.agentscope.core.training.runner.