AS AgentScopeAPI 手册 / API Reference

TrainingConfig

public class TrainingConfig
源码Source io/agentscope/core/training/runner/TrainingConfig.java:36–259

Training 配置,保存相关配置项。位于 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()
static

返回构建器实例。

Returns the builder.

返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:65–67

getTrinityEndpoint

public String getTrinityEndpoint()

获取 getTrinityEndpoint。

Returns the trinity endpoint.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:69–71

getTrinityApiKey

public String getTrinityApiKey()

获取 getTrinityApiKey。

Returns the trinity api key.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:73–75

getModelName

public String getModelName()

获取模型名称。

Returns the model name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:77–79

getSelectionStrategy

public TrainingSelectionStrategy getSelectionStrategy()

获取 getSelectionStrategy。

Returns the selection strategy.

返回Returns TrainingSelectionStrategy
返回TrainingSelectionStrategy。Returns training selection strategy.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:81–83

getRewardCalculator

public RewardCalculator getRewardCalculator()

获取 getRewardCalculator。

Returns the reward calculator.

返回Returns RewardCalculator
返回RewardCalculator。Returns reward calculator.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:85–87

getCommitIntervalSeconds

public long getCommitIntervalSeconds()

获取提交间隔秒。

Returns the commit interval seconds.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:89–91

getHttpTimeout

public Duration getHttpTimeout()

获取HTTP 超时。

Returns the http timeout.

返回Returns Duration
返回时长。Returns duration.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:93–95

isEnableAutoCommit

public boolean isEnableAutoCommit()

判断是否 isEnableAutoCommit。

Returns whether the enable auto commit.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:97–99

getShadowPoolSize

public int getShadowPoolSize()

获取 getShadowPoolSize。

Returns the shadow pool size.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:101–103

getShadowPoolCapacity

public int getShadowPoolCapacity()

获取 getShadowPoolCapacity。

Returns the shadow pool capacity.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:105–107

getRepeatTime

public int getRepeatTime()

获取 getRepeatTime。

Returns the repeat time.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/training/runner/TrainingConfig.java:109–111

getSampleRate

public double getSampleRate()

获取 getSampleRate。

Get current sampling rate

返回Returns double
返回数值结果。Sampling rate (0.0 ~ 1.0), returns -1 if using non-sampling strategy
源码Source io/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.

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.