@@ -29,16 +29,71 @@ message GradClipping {
2929 optional bool enable_global_grad_clip = 4 [default = false ];
3030}
3131
32+ message FeatureStoreConfig {
33+ // Cloud credentials (AK/SK/STS) are resolved at runtime through the
34+ // Alibaba Cloud default credential provider chain (alibabacloud_credentials).
35+ // FeatureDB credentials are read from FEATUREDB_USERNAME/FEATUREDB_PASSWORD.
36+ // FeatureStore control-plane region. An explicitly empty value falls back
37+ // to ALIBABA_CLOUD_REGION at runtime.
38+ required string region = 1 ;
39+ // Existing FeatureStore project name and target DynamicEmbedding FeatureView
40+ // name. The view is validated at startup and created when it does not exist,
41+ // together with a default FeatureStore entity that is auto-created on demand.
42+ required string project_name = 2 ;
43+ required string feature_view_name = 3 ;
44+ // FeatureDB version for this incremental training run.
45+ required string version = 5 ;
46+
47+
48+ // Optional FeatureStore control-plane endpoint override, passed directly to
49+ // the FeatureStore SDK, which owns endpoint handling and connection errors.
50+ optional string endpoint = 6 ;
51+ // Maximum records submitted before each SDK write_flush() completion gate.
52+ optional uint32 upload_batch_size = 7 [default = 1000 ];
53+ // Total attempts per rank for one step. All retries reuse the version;
54+ // each attempt reserves a newer monotonic ts range and fully replays the
55+ // rank's delta so incremental readers cannot miss a partial earlier attempt.
56+ optional uint32 max_retries = 8 [default = 3 ];
57+ optional uint32 retry_backoff_secs = 9 [default = 5 ];
58+ // Maximum time normal training shutdown waits for the uploader to drain.
59+ optional uint32 shutdown_timeout_secs = 10 [default = 600 ];
60+ // Apply back-pressure when too many completed dumps await upload; bounds
61+ // the per-rank memory retained by pending in-memory deltas.
62+ optional uint32 max_pending_steps = 11 [default = 32 ];
63+ optional uint32 poll_interval_secs = 12 [default = 1 ];
64+ // Creation settings used only when feature_view_name does not yet exist.
65+ optional uint32 feature_view_ttl_secs = 13 [default = 1296000 ];
66+ optional uint32 feature_view_shard_count = 14 [default = 20 ];
67+ optional uint32 feature_view_replication_count = 15 [default = 1 ];
68+ reserved 4 , 16 ;
69+ reserved "feature_entity_name" , "allow_custom_endpoint" ;
70+ // Also write the local per-rank delta parquet files while uploading to
71+ // FeatureStore (e.g. for the offline readback checker); by default the
72+ // delta is handed to the uploader in memory and never touches disk.
73+ optional bool retain_local_dump = 17 [default = false ];
74+ // Wire format for delta upload. "ARROW" (default) streams a columnar Arrow
75+ // IPC batch through write_features_arrow(), avoiding the JSON path's per-row
76+ // dict construction and embedding deep-copy; "JSON" keeps the legacy
77+ // write_features() per-row payload. Both paths use MERGE write_mode.
78+ optional string upload_format = 18 [default = "ARROW" ];
79+ }
80+
3281message DeltaEmbeddingDumpConfig {
3382 // MC/ZCH features are not supported; use dynamicemb for delta dump.
34- // dump touched ids and their latest embedding every N training steps. Larger
35- // intervals retain a longer id window in memory; auto compaction reduces
83+ // Dump touched ids and their latest embedding every N training steps. Do not
84+ // set this together with dump_interval_minutes.
85+ // Larger intervals retain a longer id window in memory; auto compaction reduces
3686 // per-batch tensor buildup but unique ids still scale with the interval.
3787 optional uint32 dump_interval_steps = 1 [default = 1000 ];
3888 // output directory. default is ${model_dir}/delta_embedding_dump
3989 optional string output_dir = 2 ;
4090 // parquet file prefix
4191 optional string file_prefix = 3 [default = "delta_embedding" ];
92+ // Presence enables best-effort per-rank background upload to FeatureStore.
93+ optional FeatureStoreConfig feature_store_config = 4 ;
94+ // Dump after this many elapsed minutes. The timer starts when training starts.
95+ // Do not set this together with dump_interval_steps.
96+ optional uint32 dump_interval_minutes = 5 ;
4297}
4398
4499message TrainConfig {
0 commit comments