PyTorchCheckpoint 0.1.0
.NET 10.0
This package targets .NET 10.0. The package is compatible with this framework or higher.
.NET Framework 4.8
This package targets .NET Framework 4.8. The package is compatible with this framework or higher.
dotnet add package PyTorchCheckpoint --version 0.1.0
NuGet\Install-Package PyTorchCheckpoint -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PyTorchCheckpoint" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PyTorchCheckpoint" Version="0.1.0" />
<PackageReference Include="PyTorchCheckpoint" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PyTorchCheckpoint --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PyTorchCheckpoint, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PyTorchCheckpoint@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PyTorchCheckpoint&version=0.1.0
#tool nuget:?package=PyTorchCheckpoint&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PyTorchCheckpoint
Minimal reader for the modern PyTorch zipfile checkpoint format (.pt), with no runtime dependencies beyond the .NET framework.
This library:
- Opens a PyTorch zip checkpoint and parses
data.pkl(pickle) to discover tensors/storages. - Provides access to storages (
data/<key>) as either aStreamor abyte[].
It is intentionally minimal: it does not execute Python, and it only implements the subset of pickle/PyTorch rebuild ops needed to locate tensors and their storages.
Usage
using PyTorchCheckpoint;
using var ckpt = TorchCheckpoint.Open("model.pt");
foreach (var t in ckpt.Tensors)
{
Console.WriteLine($"{t.Name} {t.Storage.ScalarType} numel={t.Numel}");
// For large storages prefer OpenStorage(...) and stream access.
var bytes = ckpt.GetStorageBytes(t.Storage);
}
Notes / limitations
- Supports the modern zipfile serialization layout (expects
data.pklplusdata/<key>entries). - Dtype is inferred from
*Storagetypes referenced bydata.pkl(e.g.FloatStorage,HalfStorage,BFloat16Storage, ...).
License
MIT. See LICENSE in this directory.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- No dependencies.
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 111 | 1/19/2026 |