Skip to content

[FR]: Add Support for Updating Experiment Metadata with Status (e.g., "running") Before Creating Experiment Items #2099

@serkon

Description

@serkon

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 like createExperiment and getExperimentById, but there is no updateExperimentById or similar method to modify an experiment's metadata.

Proposed Solution

  1. Add a method like updateExperimentById to the Experiments class in the Opik API client, allowing updates to fields such as name, metadata, and type.

  2. Example method signature:

updateExperimentById(
  id: string,
  request: ExperimentUpdate,
  requestOptions?: Experiments.RequestOptions
): HttpResponsePromise<void>;
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions