import { CallSchema, CallsFilter, Api as TraceServerApi } from './generated/traceServerApi'; import { Op, OpRef, ParameterNamesOption } from './opType'; import { Settings } from './settings'; import { WandbServerApi } from './wandb/wandbServerApi'; import { ObjectRef } from './weaveObject'; export type CallStackEntry = { callId: string; traceId: string; childSummary: Record; }; declare class CallStack { private stack; constructor(stack?: CallStackEntry[]); peek(): CallStackEntry | null; pushNewCall(): { currentCall: CallStackEntry; parentCall?: CallStackEntry; newStack: CallStack; }; } export declare class WeaveClient { traceServerApi: TraceServerApi; private wandbServerApi; projectId: string; settings: Settings; private stackContext; private callQueue; private batchProcessTimeout; private isBatchProcessing; private batchProcessingPromises; private readonly BATCH_INTERVAL; private errorCount; private readonly MAX_ERRORS; constructor(traceServerApi: TraceServerApi, wandbServerApi: WandbServerApi, projectId: string, settings?: Settings); private scheduleBatchProcessing; waitForBatchProcessing(): Promise; private processBatch; publish(obj: any, objId?: string): Promise; getCall(callId: string, includeCosts?: boolean): Promise; getCalls(filter?: CallsFilter, includeCosts?: boolean, limit?: number): Promise; getCallsIterator(filter?: CallsFilter, includeCosts?: boolean, limit?: number): AsyncIterableIterator; get(ref: ObjectRef): Promise; private saveArbitrary; private saveObject; private saveTable; /** * Recursively save a Weave value, attaching __savedRef Promises to * nested value that gets its own ref. * * This function must be synchronous, so that code that does ref-tracking * (currently only Dataset/DatasetRow in the js client) has refs * available immediately. */ private saveWeaveValues; private serializedFileBlob; private serializedImage; private serializedAudio; /** * Get the serialized value of a Weave value, by recursively * resolving any __savedRef promises to their uri(). * * This function is asynchronous, and must be called after saveWeaveValues * has been called on the value. */ private serializedVal; private saveCallStart; private saveCallEnd; getCallStack(): CallStack; pushNewCall(): { currentCall: CallStackEntry; parentCall?: CallStackEntry; newStack: CallStack; }; runWithCallStack(callStack: CallStack, fn: () => T): T; private paramsToCallInputs; saveOp(op: Op<(...args: any[]) => any>, objId?: string): Promise; createCall(opRef: OpRef | Op, params: any[], parameterNames: ParameterNamesOption, thisArg: any, currentCall: CallStackEntry, parentCall: CallStackEntry | undefined, startTime: Date, displayName?: string): Promise; finishCall(result: any, currentCall: CallStackEntry, parentCall: CallStackEntry | undefined, summarize: undefined | ((result: any) => Record), endTime: Date, startCallPromise: Promise): Promise; finishCallWithException(error: any, currentCall: CallStackEntry, parentCall: CallStackEntry | undefined, endTime: Date, startCallPromise: Promise): Promise; } export {}; //# sourceMappingURL=weaveClient.d.ts.map