OpenPipe / OpenPipe/ART

Add from_entity parameter to _experimental_fork_checkpoint

Open Beginner friendly
#649 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.8k
Forks
989
Avg merge
6h 29m
Merged PRs (30d)
85

Description

Problem

_experimental_fork_checkpoint in ServerlessBackend constructs the source artifact path using the destination model's entity (line ~89):

from_entity = model.entity or api.default_entity
collection_path = f"{from_entity}/{from_project}/{from_model}"

This means you can't fork from a checkpoint in a different W&B entity. For example, forking from willow-voice/willow_normal/kl-000-1 into wb-training/willow_normal/my-new-run fails because it looks for the artifact under wb-training.

Proposed Fix

Add an optional from_entity parameter to _experimental_fork_checkpoint:

async def _experimental_fork_checkpoint(
    self,
    model: Model,
    from_model: str,
    from_project: str | None = None,
    from_entity: str | None = None,  # NEW
    from_s3_bucket: str | None = None,
    not_after_step: int | None = None,
    verbose: bool = False,
    prefix: str | None = None,
) -> None:

And use it when constructing the artifact path:

from_entity = from_entity or model.entity or api.default_entity

Current Workaround

Download the artifact from the source entity and re-upload it to the destination entity before calling fork. This works but doubles the artifact storage and adds an unnecessary copy step.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ServerlessBackend._experimental_fork_checkpoint and inspect the artifact path construction around line 89. Add the optional source-entity input described in the issue, and verify that a checkpoint can be forked from an entity different from the destination model's entity without the download-and-reupload workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.