forked from google/ml-flashpoint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
195 lines (170 loc) · 7.73 KB
/
pyproject.toml
File metadata and controls
195 lines (170 loc) · 7.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===================================================================
# PEP 621: Project Metadata
# This section defines the core information about your package.
# This is what will be displayed on PyPI.
# ===================================================================
[project]
name = "ml-flashpoint"
dynamic = [ "version" ]
description = "A memory-first, lightning fast, easy-to-use ML checkpointing library."
readme = "README.md"
license = { file = "LICENSE" }
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
]
# Specifies the minimum version of Python required to install and run this package.
requires-python = ">=3.10"
# A list of core runtime dependencies. These packages will ALWAYS be installed
# when a user runs `pip install ml-flashpoint`.
dependencies = [
"typing-extensions==4.15.0",
]
# ===================================================================
# Optional Dependencies (also known as "extras")
# These are sets of dependencies that can be installed for specific
# features or use cases. A user installs them with `pip install .[extra_name]`.
# All dependencies should be sorted in alphabetical order.
# ===================================================================
[project.optional-dependencies]
# An extra for users who want to use this library with just PyTorch.
# Installed via: `pip install ml-flashpoint[pytorch]`
pytorch = ["torch==2.8.0"]
# An extra for users who want to use this library with its Megatron-LM adapter.
# Installed via: `pip install ml-flashpoint[megatron]`
megatron = ["megatron_core==0.13.1"]
# An extra for users who want to use this library with NeMo.
# Installed via: `pip install ml-flashpoint[nemo]`
nemo = [
"lightning==2.4.0",
"ml_flashpoint[pytorch]",
"nemo_toolkit[all]==2.4.0",
]
# An extra for generating the documentation site.
# Installed via: `pip install ml-flashpoint[docs]`
docs = [
# Documentation static-site-generator (mkdocs) with theme support.
"mkdocs-material==9.7.0",
# For collecting source code and docstrings into documentation.
"mkdocstrings-python==2.0.1",
# Documentation static-site-generator (mkdocs) with theme support. Successor of mkdocs-material.
#"zensical==0.0.11",
]
# Defines a "dev" extra for setting up a development environment.
# Installed via: `pip install -e .[dev]`
dev = [
# A more advanced assertion framework.
"assertpy==1.1",
# Adds the optional pytorch dependency set to the development environment.
"ml-flashpoint[pytorch,megatron,nemo,docs]",
# Our testing framework.
"pytest==8.4.1",
# A plugin for pytest that generates code coverage reports for Python.
"pytest-cov==7.0.0",
# C++ testing plugin for pytest (discovers and runs C++ tests alongside Python tests).
"pytest-cpp==2.6.0",
# A tool for managing C++ code coverage reports, which can be useful for combining with Python coverage.
"gcovr==8.4",
# Pytest mocking fixture support.
"pytest-mock==3.15.0",
# A fast Python linter and code formatter.
"ruff==0.12.11",
]
# ===================================================================
# PEP 518: Build System Definition
# This section tells `pip` what tools are needed to BUILD your package from source.
# These are NOT runtime dependencies for the end-user.
# ===================================================================
[build-system]
# A list of build-time dependencies. `pip` will install these into a temporary,
# isolated environment just for the duration of the build process.
requires = [
"pybind11==3.0.1",
"scikit-build-core==0.11.6",
"cmake==3.31.10",
"ninja==1.11.1.3",
"setuptools-scm==9.2.2",
]
# The Python object that `pip` will call to execute the build.
# This points to the build backend provided by scikit-build-core.
build-backend = "scikit_build_core.build"
# ===================================================================
# Tool-specific Configuration for scikit-build-core
# This section configures the behavior of the `scikit-build-core` build tool.
# ===================================================================
[tool.scikit-build]
# Tells scikit-build-core to use setuptools-scm to retrieve the version from git.
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
# Specifies the minimum version of CMake that must be present on the system.
cmake.version = ">=3.18"
# For completeness, ensure sdist contains all C++ fetched dependencies as well by running cmake before building.
sdist.cmake = true
# Explicit, consistent build-dir (instead of using a temp dir, the default) to speed up rebuilds.
build-dir = "build/{wheel_tag}"
# The path to the directory containing your top-level `CMakeLists.txt` file.
# This is where the C/C++ part of the build is defined.
cmake.source-dir = "."
# Tells scikit-build-core where to find the Python package source code.
# This ensures that all Python files (`.py`) are included in the final
# installable wheel alongside the compiled C++ code.
# Searches standard locations by default. For more info, see:
# https://scikit-build-core.readthedocs.io/en/latest/configuration/index.html#customizing-the-built-wheel
# wheel.packages = ["src/ml_flashpoint"]
# ===================================================================
# Tool-specific Configuration for setuptools-scm
# ===================================================================
[tool.setuptools_scm]
# Fallback version to use if git is not available or the directory is not a git repo.
# This prevents build failures in environments like some CI runners or /tmp clones.
fallback_version = "0.0.0"
# ===================================================================
# Tool-specific Configuration for Ruff
# ===================================================================
[tool.ruff]
# Set the maximum line length for both linter and formatter
line-length = 120
# Enable Pyflakes, Pycodestyle, and other standard rules
lint.select = ["E", "F", "W", "I"]
# Add the format pseudo-linter
lint.extend-select = ["RUF100"]
# ===================================================================
# Tool-specific Configuration for pytest
# ===================================================================
[tool.pytest.ini_options]
norecursedirs = [
".git",
"build/**/_deps",
]
# ===================================================================
# ===================================================================
# Tool-specific Configuration for python coverage
# ===================================================================
[tool.coverage.report]
fail_under = 90
# ===================================================================
# Tool-specific Configuration for cxx coverage
# ===================================================================
[tool.gcovr]
fail-under-line = "80"
#fail-under-branch = "85"