Repository navigation
feat(client)!: read releases through the coordinator - #660
Merged
Merged
Conversation
This was referenced Nov 4, 2026
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 4, 2026 13:16
6a611d0 to
101f88c
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 4, 2026 13:34
101f88c to
a25ce47
Compare
This was referenced Nov 4, 2026
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 4, 2026 14:58
a25ce47 to
9993e86
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
3 times, most recently
from
November 4, 2026 20:02
f7264df to
aba3694
Compare
This was referenced Nov 4, 2026
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 7, 2026 15:20
6ce6a2e to
409aaf2
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 7, 2026 16:27
409aaf2 to
5d01262
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 7, 2026 17:40
5d01262 to
0244b5f
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 7, 2026 22:40
0244b5f to
73b4b24
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 9, 2026 13:56
73b4b24 to
4479e73
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 10, 2026 14:39
4479e73 to
005c4ba
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 10, 2026 15:50
005c4ba to
175f32a
Compare
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 10, 2026 16:24
175f32a to
867cc8c
Compare
open(), load() and open_torch() now read through read_release(), the read coordinator. A read opens each release where it is and copies nothing. A local client asks its own registry first, then the registry that fetch_from names, then the installed connectors if auto_build is set. A remote client asks only its own registry and never builds. Without a version, a read takes the newest version of the first source that serves the dataset. So a copy in the local registry answers, and the read asks no other source and builds nothing. An empty version string means the same. With org/x@latest or version="latest", a read takes the highest version across all the sources. _read_sources() maps fetch_from and auto_build onto that list of sources. The error hints still name the two keywords. A missing release or payload source names each keyword that the call did not use. An access error on a local client with auto_build=False names auto_build=True. A remote client keeps its hint to build the dataset locally, and its other errors name no keyword. _prepare(), _obtain() and _require_open() go away, and the client no longer calls prepare_local_copy(). The before_fetch callback of prepare_local_copy() had no other caller, so it goes too. No caller passes pinned_by to plan_release_build() any more, so that parameter goes as well. BREAKING CHANGE: open(fetch_from=...) reads in place and copies nothing into the local registry. A damaged local copy raises TimeNetFileError also with fetch_from, and the error has no repair hint. "latest" is no longer the same as no version. It is the highest version across the local registry, fetch_from and, with auto_build, the installed connectors. So a read of "latest" builds a newer version that a connector declares, and it needs each registry to be reachable. A payload source that the local registry lacks is read from fetch_from in place. A registry that lists a release without serving it falls through to a build when auto_build is set, also for a read. The message for a missing release names each source, and the hint names fetch_from=<registry> as a registry to read from. The before_fetch argument of prepare_local_copy() is gone. Part of TNET-157.
… glue The comment on the read hints and the docstring of _read_sources now start with "Glue:". They say that this code stays until the client takes a list of sources. Part of TNET-157.
The glue comment on the read hints and the glue note in the docstring of _read_sources() now start with TODO(adrian), so a search finds each one that is left. Part of TNET-157.
Say only what a caller of open(), load() and open_torch() needs to know. Part of TNET-157.
Shorter docstrings for the code that this change adds or changes. Part of TNET-157.
Drop tests that cannot fail or repeat other tests, and sharpen the rest. Part of TNET-157.
karhu
force-pushed
the
tnet-157/12-client-reads
branch
from
November 10, 2026 17:41
867cc8c to
a2fc3c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Stack
This stack covers refactoring the internal logic of how releases are resolved during read, download & build, in particular also in the context of parent releases / parent datasets. On top of that it refactors the public TimeNet APIs and CLI interfaces around these actions, to streamline the behavior across them.
This PR
Moves
open(),load()andopen_torch()of the client ontoread_release().Details
The client still opens a release through its own steps:
_prepare(),_obtain()and_require_open()(TNET-157). #659 adds the read coordinator. This PR moves the client onto it.open(),load()andopen_torch()read throughread_release(). A read opens each release where it is and copies nothing.fetch_fromnames. Ifauto_buildis set, it then asks the installed connectors. A remote client asks only its own registry and never builds._read_sources()mapsfetch_fromandauto_buildonto that list of sources.auto_build=Falsenamesauto_build=True._prepare(),_obtain()and_require_open()go away, and so does thebefore_fetchcallback ofprepare_local_copy(), which had no other caller.Design decisions
download(), which a later PR moves onto the same list.fetch_fromand never builds, so its errors name no keyword, except its hint to build the dataset locally.Breaking changes
open(fetch_from=...)reads in place and copies nothing into the local registry.TimeNetFileErroralso withfetch_from, and the error has no repair hint."latest"(org/name@latest) is the highest version across the local registry,fetch_fromand, withauto_build, the installed connectors. So a read can build a newer version that a connector declares.open(),load()andopen_torch()read the newest version of the first source that serves the dataset. With@latest, they ask every source, so each registry must be reachable.fetch_fromin place.auto_buildis set, a registry that lists a release without serving it falls through to a build, also for a read.before_fetchargument ofprepare_local_copy()is gone.Stack
Changes later in the stack:
_read_sources(),_missing_hint()and theauto_build=Trueaccess hint are thin glue. The next PR replaces them withTimeNet(sources=[...]).Merge message