workloadMetadata describes the workload a traceset was captured from. You send it when you request upload URLs (POST /api/v1/tracesets/upload-url), and GET /api/v1/tracesets/{id} returns it as stored. This page describes it on upload, where its schema is UploadWorkloadMetadata in the OpenAPI description. Clients generated from an earlier version of the OpenAPI description name this type WorkloadMetadata; the JSON is the same.
The schema describes the members that declare the traceset’s rank count: shape.rankCount and the parallelism degrees. Every member is optional. The object may also carry descriptive members (see Descriptive members). Upload stores and returns the whole object as given, up to 65,536 bytes when serialized, and validates only the rank-count members.
Declaring the rank count
An upload that containsprimary trace files must declare its rank count in one of two ways, or both:
shape.rankCount: the total rank count.parallelism: the degreesdp,tp,sp,epandpp. The rank count is their product, and an absent degree counts as 1. Other degrees, such ascpandfsdp, may be given but are not factors, and upload does not check them; promotion checkscpandfsdp.
- Each of
shape.rankCount,dp,tp,sp,epandppthat you give must be a whole number of at least 1.0,-1,2.0and"4"are refused. - When both forms are given,
shape.rankCountmust equal the product. - The rank count must not exceed 2,147,483,647.
- JSON
nullcounts as absent, forshape,parallelismand each value inside them. - A
parallelismobject that holds none ofdp,tp,sp,epandppdeclares nothing, and promotion refuses such aparallelism. - The key is
rankCount. Ashape.rank_countis not read as a declaration.
shape.rankCount alone is enough; the parallelism degrees are optional.
The product treats each of dp, tp, sp, ep and pp as an independent factor of the rank count. Some training frameworks count an axis differently, for example expert parallelism within data parallelism, sequence parallelism within the tensor-parallel group, or context parallelism as a factor of the rank count. When your rank count is not this product, declare shape.rankCount, and give degrees only if their product equals it.
An upload of supporting files only (no primary file) does not need a rank count.
The traceset reports its rank count as rankCountDerived on GET /api/v1/tracesets/{id}. A rank count cannot be changed after upload.
Members
WorkloadShape
Other members of
shape are stored and returned as given.
WorkloadParallelism
Other members of
parallelism, such as cp and fsdp, are stored and returned as given. Upload does not check them; promotion checks cp and fsdp. Neither is a factor of the product:
cp, the context parallelism degree: the number of ranks that split the attention computation over a long sequence’s context.fsdp, the fully sharded data parallel (FSDP) degree: the number of data-parallel ranks the model’s parameters, gradients and optimizer state are sharded across. It dividesdprather than adding ranks.
Descriptive members
workloadMetadata may also describe the workload, for example its family, name, precision or accelerator. Upload does not read these members: it stores and returns them as given, whatever their spelling. The schema does not describe them yet, because the platform does not spell them consistently. Where it reads them, it reads snake_case, for example workload_family, workload_name and shape.global_batch_size: traceset promotion (the Python client’s promote_traceset) and the traceset list’s workload filters, which this API description does not yet document, both do. Declare the rank count itself in the camelCase spellings above: upload reads it that way, and so does promotion’s guard against changing it, where a shape.rank_count does not count as a declaration. Promotion’s member checks do read a shape.rank_count, and refuse one that differs from the parallelism product. If you promote a traceset with new metadata, promotion can refuse it unless it declares, through shape.rankCount or the parallelism degrees, the same rank count the traceset holds (none, if it holds none). If you rely on promotion or on those filters, send the descriptive members in snake_case. Promotion also reads the whole object through a typed model and applies its own validation, so a member that upload stored without checking, such as a cp that is not a whole number, can make promotion fail.
Example
A 256-rank trace, declared both ways (32 × 8 × 1 = 256):Errors
POST /api/v1/tracesets/upload-url answers 400 before issuing any upload URL when:
- the upload has
primaryfiles and declares no rank count:Uploads with primary trace files must declare a rank count: set workloadMetadata.shape.rankCount, or workloadMetadata.parallelism degrees (dp, tp, sp, ep, pp); - a rank-count value is not a whole number of at least 1, naming the member and the value;
shape.rankCountand the parallelism product differ, naming both;- the rank count exceeds 2,147,483,647;
workloadMetadata,shapeorparallelismis neither an object nor null;workloadMetadatais larger than 65,536 bytes when serialized.