-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Hi Team,
I'm using the Opik API client and noticed that there is no direct method to update an experiment's metadata, such as setting a status like "running"
before creating experiment items. I would like to request the addition of a feature or method to support this functionality.
Use Case
- Update an experiment's metadata to include a
status
field (e.g.,"status": "running"
) before associating experiment items with it. - Track the experiment's state in workflows where experiment items are created after preprocessing steps.
- Currently, the
Experiments
class supports methods likecreateExperiment
andgetExperimentById
, but there is noupdateExperimentById
or similar method to modify an experiment's metadata.
Proposed Solution
-
Add a method like
updateExperimentById
to theExperiments
class in the Opik API client, allowing updates to fields such asname
,metadata
, andtype
. -
Example method signature:
updateExperimentById(
id: string,
request: ExperimentUpdate,
requestOptions?: Experiments.RequestOptions
): HttpResponsePromise<void>;
- The ExperimentUpdate interface could include fields like:
interface ExperimentUpdate {
name?: string;
metadata?: Record<string, any>;
type?: ExperimentWriteType;
status?: string; // e.g., "running", "completed", etc.
}
Additional Context
Reviewed the TypeScript definition file (Client-BcByCGQn.d.ts) and confirmed that no update method exists in the Experiments class.
Updating metadata directly would streamline workflows and improve experiment tracking without requiring recreation of experiments or modification of related resources like experiment items.
Specific use case involves setting a "running" status in the metadata to indicate that the experiment is in progress before experiment items are created.