ZhengyangZhang commited on
Commit
9d557fc
·
verified ·
1 Parent(s): b6062dd

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +249 -0
  2. bin/deepspeed.pt +3 -0
  3. bin/ninja +3 -0
  4. lib/python3.12/site-packages/IPython/core/__pycache__/completer.cpython-312.pyc +3 -0
  5. lib/python3.12/site-packages/IPython/core/__pycache__/interactiveshell.cpython-312.pyc +3 -0
  6. lib/python3.12/site-packages/_yaml/__init__.py +33 -0
  7. lib/python3.12/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc +0 -0
  8. lib/python3.12/site-packages/absl/testing/__pycache__/absltest.cpython-312.pyc +3 -0
  9. lib/python3.12/site-packages/attr/__pycache__/_make.cpython-312.pyc +3 -0
  10. lib/python3.12/site-packages/certifi-2026.1.4.dist-info/INSTALLER +1 -0
  11. lib/python3.12/site-packages/certifi-2026.1.4.dist-info/METADATA +78 -0
  12. lib/python3.12/site-packages/certifi-2026.1.4.dist-info/RECORD +14 -0
  13. lib/python3.12/site-packages/certifi-2026.1.4.dist-info/WHEEL +5 -0
  14. lib/python3.12/site-packages/certifi-2026.1.4.dist-info/licenses/LICENSE +20 -0
  15. lib/python3.12/site-packages/certifi-2026.1.4.dist-info/top_level.txt +1 -0
  16. lib/python3.12/site-packages/cusparselt/lib/libcusparseLt.so.0 +3 -0
  17. lib/python3.12/site-packages/datasets/__pycache__/arrow_dataset.cpython-312.pyc +3 -0
  18. lib/python3.12/site-packages/datasets/__pycache__/dataset_dict.cpython-312.pyc +3 -0
  19. lib/python3.12/site-packages/datasets/__pycache__/iterable_dataset.cpython-312.pyc +3 -0
  20. lib/python3.12/site-packages/datasets/__pycache__/table.cpython-312.pyc +3 -0
  21. lib/python3.12/site-packages/datasets/features/__pycache__/features.cpython-312.pyc +3 -0
  22. lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/INSTALLER +1 -0
  23. lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/METADATA +443 -0
  24. lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/RECORD +0 -0
  25. lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/REQUESTED +0 -0
  26. lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/WHEEL +5 -0
  27. lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/entry_points.txt +2 -0
  28. lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/licenses/LICENSE +201 -0
  29. lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/top_level.txt +1 -0
  30. lib/python3.12/site-packages/deepspeed/nebula/__pycache__/__init__.cpython-312.pyc +0 -0
  31. lib/python3.12/site-packages/distutils-precedence.pth +3 -0
  32. lib/python3.12/site-packages/filelock/__init__.py +70 -0
  33. lib/python3.12/site-packages/filelock/__pycache__/__init__.cpython-312.pyc +0 -0
  34. lib/python3.12/site-packages/filelock/__pycache__/_api.cpython-312.pyc +0 -0
  35. lib/python3.12/site-packages/filelock/__pycache__/_error.cpython-312.pyc +0 -0
  36. lib/python3.12/site-packages/filelock/__pycache__/_soft.cpython-312.pyc +0 -0
  37. lib/python3.12/site-packages/filelock/__pycache__/_unix.cpython-312.pyc +0 -0
  38. lib/python3.12/site-packages/filelock/__pycache__/_util.cpython-312.pyc +0 -0
  39. lib/python3.12/site-packages/filelock/__pycache__/_windows.cpython-312.pyc +0 -0
  40. lib/python3.12/site-packages/filelock/__pycache__/asyncio.cpython-312.pyc +0 -0
  41. lib/python3.12/site-packages/filelock/__pycache__/version.cpython-312.pyc +0 -0
  42. lib/python3.12/site-packages/filelock/_api.py +403 -0
  43. lib/python3.12/site-packages/filelock/_error.py +30 -0
  44. lib/python3.12/site-packages/filelock/_soft.py +47 -0
  45. lib/python3.12/site-packages/filelock/_unix.py +70 -0
  46. lib/python3.12/site-packages/filelock/_util.py +52 -0
  47. lib/python3.12/site-packages/filelock/_windows.py +65 -0
  48. lib/python3.12/site-packages/filelock/asyncio.py +342 -0
  49. lib/python3.12/site-packages/filelock/py.typed +0 -0
  50. lib/python3.12/site-packages/filelock/version.py +21 -0
.gitattributes CHANGED
@@ -272,3 +272,252 @@ lib/python3.12/site-packages/transformers/models/deprecated/xlm_prophetnet/__pyc
272
  lib/python3.12/site-packages/transformers/models/deprecated/deta/__pycache__/modeling_deta.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
273
  lib/python3.12/site-packages/transformers/models/deprecated/mega/__pycache__/modeling_mega.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
274
  lib/python3.12/site-packages/transformers/models/speecht5/__pycache__/modeling_speecht5.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  lib/python3.12/site-packages/transformers/models/deprecated/deta/__pycache__/modeling_deta.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
273
  lib/python3.12/site-packages/transformers/models/deprecated/mega/__pycache__/modeling_mega.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
274
  lib/python3.12/site-packages/transformers/models/speecht5/__pycache__/modeling_speecht5.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
275
+ bin/ninja filter=lfs diff=lfs merge=lfs -text
276
+ lib/python3.12/site-packages/flash_attn_2_cuda.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
277
+ lib/python3.12/site-packages/matplotlib/_path.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
278
+ lib/python3.12/site-packages/matplotlib/_image.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
279
+ lib/python3.12/site-packages/matplotlib/_tri.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
280
+ lib/python3.12/site-packages/matplotlib/ft2font.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
281
+ lib/python3.12/site-packages/matplotlib/_c_internal_utils.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
282
+ lib/python3.12/site-packages/matplotlib/_qhull.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
283
+ lib/python3.12/site-packages/matplotlib/tests/__pycache__/test_figure.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
284
+ lib/python3.12/site-packages/matplotlib/tests/__pycache__/test_axes.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
285
+ lib/python3.12/site-packages/matplotlib/tests/__pycache__/test_ticker.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
286
+ lib/python3.12/site-packages/matplotlib/tests/__pycache__/test_image.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
287
+ lib/python3.12/site-packages/matplotlib/axes/__pycache__/_base.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
288
+ lib/python3.12/site-packages/matplotlib/axes/__pycache__/_axes.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
289
+ lib/python3.12/site-packages/matplotlib/backends/_tkagg.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
290
+ lib/python3.12/site-packages/matplotlib/backends/_backend_agg.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
291
+ lib/python3.12/site-packages/matplotlib/__pycache__/backend_bases.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
292
+ lib/python3.12/site-packages/matplotlib/__pycache__/_mathtext.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
293
+ lib/python3.12/site-packages/matplotlib/__pycache__/pyplot.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
294
+ lib/python3.12/site-packages/matplotlib/__pycache__/patches.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
295
+ lib/python3.12/site-packages/matplotlib/__pycache__/figure.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
296
+ lib/python3.12/site-packages/matplotlib/__pycache__/ticker.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
297
+ lib/python3.12/site-packages/matplotlib/__pycache__/colors.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
298
+ lib/python3.12/site-packages/matplotlib/__pycache__/transforms.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
299
+ lib/python3.12/site-packages/matplotlib/__pycache__/widgets.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
300
+ lib/python3.12/site-packages/matplotlib/__pycache__/collections.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
301
+ lib/python3.12/site-packages/matplotlib/__pycache__/_cm_listed.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
302
+ lib/python3.12/site-packages/matplotlib/__pycache__/axis.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
303
+ lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_pdf.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
304
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSansMono-BoldOblique.ttf filter=lfs diff=lfs merge=lfs -text
305
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneral.ttf filter=lfs diff=lfs merge=lfs -text
306
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralBolIta.ttf filter=lfs diff=lfs merge=lfs -text
307
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans-BoldOblique.ttf filter=lfs diff=lfs merge=lfs -text
308
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSerif-Italic.ttf filter=lfs diff=lfs merge=lfs -text
309
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSansMono.ttf filter=lfs diff=lfs merge=lfs -text
310
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSerif-Bold.ttf filter=lfs diff=lfs merge=lfs -text
311
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans-Bold.ttf filter=lfs diff=lfs merge=lfs -text
312
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSerif.ttf filter=lfs diff=lfs merge=lfs -text
313
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSansMono-Bold.ttf filter=lfs diff=lfs merge=lfs -text
314
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSerif-BoldItalic.ttf filter=lfs diff=lfs merge=lfs -text
315
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSansMono-Oblique.ttf filter=lfs diff=lfs merge=lfs -text
316
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf filter=lfs diff=lfs merge=lfs -text
317
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralItalic.ttf filter=lfs diff=lfs merge=lfs -text
318
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans-Oblique.ttf filter=lfs diff=lfs merge=lfs -text
319
+ lib/python3.12/site-packages/matplotlib/mpl-data/fonts/ttf/STIXGeneralBol.ttf filter=lfs diff=lfs merge=lfs -text
320
+ lib/python3.12/site-packages/zmq/backend/cython/_zmq.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
321
+ lib/python3.12/site-packages/orjson/orjson.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
322
+ lib/python3.12/site-packages/safetensors/_safetensors_rust.abi3.so filter=lfs diff=lfs merge=lfs -text
323
+ lib/python3.12/site-packages/cusparselt/lib/libcusparseLt.so.0 filter=lfs diff=lfs merge=lfs -text
324
+ lib/python3.12/site-packages/pillow.libs/libharfbuzz-0692f733.so.0.61230.0 filter=lfs diff=lfs merge=lfs -text
325
+ lib/python3.12/site-packages/pillow.libs/libtiff-295fd75c.so.6.2.0 filter=lfs diff=lfs merge=lfs -text
326
+ lib/python3.12/site-packages/pillow.libs/libzstd-761a17b6.so.1.5.7 filter=lfs diff=lfs merge=lfs -text
327
+ lib/python3.12/site-packages/pillow.libs/libjpeg-18a3f47f.so.62.4.0 filter=lfs diff=lfs merge=lfs -text
328
+ lib/python3.12/site-packages/pillow.libs/libwebp-d8b9687f.so.7.2.0 filter=lfs diff=lfs merge=lfs -text
329
+ lib/python3.12/site-packages/pillow.libs/liblcms2-cc10e42f.so.2.0.17 filter=lfs diff=lfs merge=lfs -text
330
+ lib/python3.12/site-packages/pillow.libs/libpng16-4a38ea05.so.16.53.0 filter=lfs diff=lfs merge=lfs -text
331
+ lib/python3.12/site-packages/pillow.libs/libfreetype-ee1c40c4.so.6.20.4 filter=lfs diff=lfs merge=lfs -text
332
+ lib/python3.12/site-packages/pillow.libs/liblzma-61b1002e.so.5.8.2 filter=lfs diff=lfs merge=lfs -text
333
+ lib/python3.12/site-packages/pillow.libs/libopenjp2-94e588ba.so.2.5.4 filter=lfs diff=lfs merge=lfs -text
334
+ lib/python3.12/site-packages/pillow.libs/libxcb-64009ff3.so.1.1.0 filter=lfs diff=lfs merge=lfs -text
335
+ lib/python3.12/site-packages/pillow.libs/libbrotlicommon-c55a5f7a.so.1.2.0 filter=lfs diff=lfs merge=lfs -text
336
+ lib/python3.12/site-packages/pillow.libs/libavif-01e67780.so.16.3.0 filter=lfs diff=lfs merge=lfs -text
337
+ lib/python3.12/site-packages/nvidia/cusolver/lib/libcusolverMg.so.11 filter=lfs diff=lfs merge=lfs -text
338
+ lib/python3.12/site-packages/nvidia/cusolver/lib/libcusolver.so.11 filter=lfs diff=lfs merge=lfs -text
339
+ lib/python3.12/site-packages/nvidia/cudnn/lib/libcudnn.so.9 filter=lfs diff=lfs merge=lfs -text
340
+ lib/python3.12/site-packages/nvidia/cudnn/lib/libcudnn_cnn.so.9 filter=lfs diff=lfs merge=lfs -text
341
+ lib/python3.12/site-packages/nvidia/cudnn/lib/libcudnn_ops.so.9 filter=lfs diff=lfs merge=lfs -text
342
+ lib/python3.12/site-packages/nvidia/cudnn/lib/libcudnn_engines_runtime_compiled.so.9 filter=lfs diff=lfs merge=lfs -text
343
+ lib/python3.12/site-packages/nvidia/cudnn/lib/libcudnn_heuristic.so.9 filter=lfs diff=lfs merge=lfs -text
344
+ lib/python3.12/site-packages/nvidia/cudnn/lib/libcudnn_graph.so.9 filter=lfs diff=lfs merge=lfs -text
345
+ lib/python3.12/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc-builtins.so.12.4 filter=lfs diff=lfs merge=lfs -text
346
+ lib/python3.12/site-packages/nvidia/cudnn/lib/libcudnn_adv.so.9 filter=lfs diff=lfs merge=lfs -text
347
+ lib/python3.12/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc.so.12 filter=lfs diff=lfs merge=lfs -text
348
+ lib/python3.12/site-packages/nvidia/cufft/lib/libcufftw.so.11 filter=lfs diff=lfs merge=lfs -text
349
+ lib/python3.12/site-packages/nvidia/cuda_runtime/lib/libcudart.so.12 filter=lfs diff=lfs merge=lfs -text
350
+ lib/python3.12/site-packages/nvidia/cusparse/lib/libcusparse.so.12 filter=lfs diff=lfs merge=lfs -text
351
+ lib/python3.12/site-packages/nvidia/cuda_cupti/lib/libnvperf_target.so filter=lfs diff=lfs merge=lfs -text
352
+ lib/python3.12/site-packages/nvidia/cuda_cupti/lib/libcupti.so.12 filter=lfs diff=lfs merge=lfs -text
353
+ lib/python3.12/site-packages/nvidia/cuda_cupti/lib/libnvperf_host.so filter=lfs diff=lfs merge=lfs -text
354
+ lib/python3.12/site-packages/nvidia/cuda_cupti/lib/libcheckpoint.so filter=lfs diff=lfs merge=lfs -text
355
+ lib/python3.12/site-packages/nvidia/cuda_cupti/lib/libpcsamplingutil.so filter=lfs diff=lfs merge=lfs -text
356
+ lib/python3.12/site-packages/nvidia/nccl/lib/libnccl.so.2 filter=lfs diff=lfs merge=lfs -text
357
+ lib/python3.12/site-packages/nvidia/curand/lib/libcurand.so.10 filter=lfs diff=lfs merge=lfs -text
358
+ lib/python3.12/site-packages/nvidia/cudnn/lib/libcudnn_engines_precompiled.so.9 filter=lfs diff=lfs merge=lfs -text
359
+ lib/python3.12/site-packages/nvidia/nvjitlink/lib/libnvJitLink.so.12 filter=lfs diff=lfs merge=lfs -text
360
+ lib/python3.12/site-packages/nvidia/cufft/lib/libcufft.so.11 filter=lfs diff=lfs merge=lfs -text
361
+ lib/python3.12/site-packages/nvidia/cublas/lib/libcublas.so.12 filter=lfs diff=lfs merge=lfs -text
362
+ lib/python3.12/site-packages/nvidia/cublas/lib/libnvblas.so.12 filter=lfs diff=lfs merge=lfs -text
363
+ lib/python3.12/site-packages/nvidia/cublas/lib/libcublasLt.so.12 filter=lfs diff=lfs merge=lfs -text
364
+ lib/python3.12/site-packages/sympy/physics/continuum_mechanics/__pycache__/beam.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
365
+ lib/python3.12/site-packages/sympy/physics/control/__pycache__/lti.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
366
+ lib/python3.12/site-packages/sympy/physics/control/tests/__pycache__/test_lti.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
367
+ lib/python3.12/site-packages/sympy/physics/mechanics/tests/__pycache__/test_joint.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
368
+ lib/python3.12/site-packages/sympy/physics/quantum/__pycache__/spin.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
369
+ lib/python3.12/site-packages/sympy/stats/tests/__pycache__/test_continuous_rv.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
370
+ lib/python3.12/site-packages/sympy/stats/__pycache__/stochastic_process_types.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
371
+ lib/python3.12/site-packages/sympy/stats/__pycache__/crv_types.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
372
+ lib/python3.12/site-packages/sympy/physics/__pycache__/secondquant.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
373
+ lib/python3.12/site-packages/sympy/physics/biomechanics/tests/__pycache__/test_curve.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
374
+ lib/python3.12/site-packages/sympy/physics/quantum/tests/__pycache__/test_spin.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
375
+ lib/python3.12/site-packages/sympy/core/tests/__pycache__/test_numbers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
376
+ lib/python3.12/site-packages/sympy/core/tests/__pycache__/test_args.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
377
+ lib/python3.12/site-packages/sympy/core/tests/__pycache__/test_relational.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
378
+ lib/python3.12/site-packages/sympy/core/tests/__pycache__/test_arit.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
379
+ lib/python3.12/site-packages/sympy/core/tests/__pycache__/test_expr.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
380
+ lib/python3.12/site-packages/sympy/core/__pycache__/expr.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
381
+ lib/python3.12/site-packages/sympy/core/__pycache__/function.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
382
+ lib/python3.12/site-packages/sympy/core/__pycache__/numbers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
383
+ lib/python3.12/site-packages/sympy/core/tests/__pycache__/test_function.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
384
+ lib/python3.12/site-packages/sympy/solvers/tests/__pycache__/test_solveset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
385
+ lib/python3.12/site-packages/sympy/solvers/tests/__pycache__/test_solvers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
386
+ lib/python3.12/site-packages/sympy/solvers/diophantine/__pycache__/diophantine.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
387
+ lib/python3.12/site-packages/sympy/solvers/ode/tests/__pycache__/test_ode.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
388
+ lib/python3.12/site-packages/sympy/solvers/ode/tests/__pycache__/test_single.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
389
+ lib/python3.12/site-packages/sympy/solvers/ode/tests/__pycache__/test_systems.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
390
+ lib/python3.12/site-packages/sympy/solvers/ode/__pycache__/single.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
391
+ lib/python3.12/site-packages/sympy/solvers/ode/__pycache__/ode.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
392
+ lib/python3.12/site-packages/sympy/solvers/__pycache__/solveset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
393
+ lib/python3.12/site-packages/sympy/solvers/__pycache__/solvers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
394
+ lib/python3.12/site-packages/sympy/crypto/__pycache__/crypto.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
395
+ lib/python3.12/site-packages/sympy/integrals/tests/__pycache__/test_integrals.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
396
+ lib/python3.12/site-packages/sympy/integrals/__pycache__/manualintegrate.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
397
+ lib/python3.12/site-packages/sympy/integrals/__pycache__/meijerint.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
398
+ lib/python3.12/site-packages/sympy/integrals/__pycache__/laplace.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
399
+ lib/python3.12/site-packages/sympy/polys/tests/__pycache__/test_rings.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
400
+ lib/python3.12/site-packages/sympy/polys/tests/__pycache__/test_polytools.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
401
+ lib/python3.12/site-packages/sympy/polys/numberfields/__pycache__/resolvent_lookup.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
402
+ lib/python3.12/site-packages/sympy/polys/domains/tests/__pycache__/test_domains.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
403
+ lib/python3.12/site-packages/sympy/polys/matrices/tests/__pycache__/test_domainmatrix.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
404
+ lib/python3.12/site-packages/sympy/polys/matrices/__pycache__/domainmatrix.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
405
+ lib/python3.12/site-packages/sympy/polys/benchmarks/__pycache__/bench_solvers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
406
+ lib/python3.12/site-packages/sympy/polys/__pycache__/rings.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
407
+ lib/python3.12/site-packages/sympy/polys/__pycache__/compatibility.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
408
+ lib/python3.12/site-packages/sympy/polys/__pycache__/polytools.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
409
+ lib/python3.12/site-packages/sympy/polys/__pycache__/polyquinticconst.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
410
+ lib/python3.12/site-packages/sympy/polys/__pycache__/polyclasses.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
411
+ lib/python3.12/site-packages/sympy/matrices/tests/__pycache__/test_matrices.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
412
+ lib/python3.12/site-packages/sympy/matrices/tests/__pycache__/test_matrixbase.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
413
+ lib/python3.12/site-packages/sympy/matrices/__pycache__/common.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
414
+ lib/python3.12/site-packages/sympy/matrices/__pycache__/matrixbase.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
415
+ lib/python3.12/site-packages/sympy/geometry/__pycache__/polygon.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
416
+ lib/python3.12/site-packages/sympy/holonomic/__pycache__/holonomic.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
417
+ lib/python3.12/site-packages/sympy/concrete/tests/__pycache__/test_sums_products.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
418
+ lib/python3.12/site-packages/sympy/functions/elementary/tests/__pycache__/test_trigonometric.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
419
+ lib/python3.12/site-packages/sympy/functions/elementary/tests/__pycache__/test_piecewise.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
420
+ lib/python3.12/site-packages/sympy/functions/elementary/tests/__pycache__/test_hyperbolic.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
421
+ lib/python3.12/site-packages/sympy/functions/elementary/__pycache__/hyperbolic.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
422
+ lib/python3.12/site-packages/sympy/functions/elementary/__pycache__/trigonometric.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
423
+ lib/python3.12/site-packages/sympy/functions/special/__pycache__/error_functions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
424
+ lib/python3.12/site-packages/sympy/functions/combinatorial/tests/__pycache__/test_comb_numbers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
425
+ lib/python3.12/site-packages/sympy/functions/combinatorial/__pycache__/numbers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
426
+ lib/python3.12/site-packages/sympy/series/tests/__pycache__/test_limits.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
427
+ lib/python3.12/site-packages/sympy/combinatorics/__pycache__/permutations.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
428
+ lib/python3.12/site-packages/sympy/combinatorics/__pycache__/perm_groups.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
429
+ lib/python3.12/site-packages/sympy/utilities/tests/__pycache__/test_lambdify.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
430
+ lib/python3.12/site-packages/sympy/utilities/tests/__pycache__/test_wester.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
431
+ lib/python3.12/site-packages/sympy/utilities/__pycache__/iterables.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
432
+ lib/python3.12/site-packages/sympy/plotting/tests/__pycache__/test_series.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
433
+ lib/python3.12/site-packages/sympy/plotting/__pycache__/series.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
434
+ lib/python3.12/site-packages/sympy/printing/tests/__pycache__/test_mathml.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
435
+ lib/python3.12/site-packages/sympy/printing/tests/__pycache__/test_latex.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
436
+ lib/python3.12/site-packages/sympy/printing/pretty/tests/__pycache__/test_pretty.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
437
+ lib/python3.12/site-packages/sympy/printing/pretty/__pycache__/pretty.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
438
+ lib/python3.12/site-packages/sympy/printing/__pycache__/mathml.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
439
+ lib/python3.12/site-packages/sympy/printing/__pycache__/latex.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
440
+ lib/python3.12/site-packages/sympy/simplify/__pycache__/hyperexpand.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
441
+ lib/python3.12/site-packages/sympy/parsing/autolev/_antlr/__pycache__/autolevparser.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
442
+ lib/python3.12/site-packages/sympy/parsing/autolev/__pycache__/_listener_autolev_antlr.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
443
+ lib/python3.12/site-packages/sympy/parsing/tests/__pycache__/test_c_parser.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
444
+ lib/python3.12/site-packages/sympy/assumptions/tests/__pycache__/test_query.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
445
+ lib/python3.12/site-packages/sympy/parsing/latex/_antlr/__pycache__/latexparser.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
446
+ lib/python3.12/site-packages/sympy/sets/tests/__pycache__/test_fancysets.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
447
+ lib/python3.12/site-packages/sympy/sets/tests/__pycache__/test_sets.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
448
+ lib/python3.12/site-packages/sympy/sets/__pycache__/sets.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
449
+ lib/python3.12/site-packages/sympy/tensor/tests/__pycache__/test_tensor.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
450
+ lib/python3.12/site-packages/sympy/tensor/array/expressions/__pycache__/array_expressions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
451
+ lib/python3.12/site-packages/sympy/tensor/__pycache__/tensor.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
452
+ lib/python3.12/site-packages/sympy/logic/tests/__pycache__/test_boolalg.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
453
+ lib/python3.12/site-packages/sympy/logic/__pycache__/boolalg.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
454
+ lib/python3.12/site-packages/pygments/lexers/__pycache__/lisp.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
455
+ lib/python3.12/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text
456
+ lib/python3.12/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text
457
+ lib/python3.12/site-packages/pip/_vendor/distlib/t64-arm.exe filter=lfs diff=lfs merge=lfs -text
458
+ lib/python3.12/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text
459
+ lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
460
+ lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/console.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
461
+ lib/python3.12/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
462
+ lib/python3.12/site-packages/pip/_vendor/__pycache__/typing_extensions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
463
+ lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
464
+ lib/python3.12/site-packages/IPython/core/__pycache__/completer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
465
+ lib/python3.12/site-packages/IPython/core/__pycache__/interactiveshell.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
466
+ lib/python3.12/site-packages/jiter/jiter.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
467
+ lib/python3.12/site-packages/pydantic_core/__pycache__/core_schema.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
468
+ lib/python3.12/site-packages/pydantic_core/_pydantic_core.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
469
+ lib/python3.12/site-packages/torchaudio/transforms/__pycache__/_transforms.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
470
+ lib/python3.12/site-packages/torchaudio/functional/__pycache__/functional.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
471
+ lib/python3.12/site-packages/torchaudio/lib/_torchaudio_sox.so filter=lfs diff=lfs merge=lfs -text
472
+ lib/python3.12/site-packages/torchaudio/lib/pybind11_prefixctc.so filter=lfs diff=lfs merge=lfs -text
473
+ lib/python3.12/site-packages/torchaudio/lib/_torchaudio.so filter=lfs diff=lfs merge=lfs -text
474
+ lib/python3.12/site-packages/torchaudio/lib/libctc_prefix_decoder.so filter=lfs diff=lfs merge=lfs -text
475
+ lib/python3.12/site-packages/torchaudio/lib/libtorchaudio_sox.so filter=lfs diff=lfs merge=lfs -text
476
+ lib/python3.12/site-packages/torchaudio/lib/libtorchaudio.so filter=lfs diff=lfs merge=lfs -text
477
+ lib/python3.12/site-packages/kiwisolver/_cext.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
478
+ lib/python3.12/site-packages/absl/testing/__pycache__/absltest.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
479
+ lib/python3.12/site-packages/datasets/__pycache__/dataset_dict.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
480
+ lib/python3.12/site-packages/datasets/__pycache__/table.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
481
+ lib/python3.12/site-packages/datasets/__pycache__/iterable_dataset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
482
+ lib/python3.12/site-packages/datasets/__pycache__/arrow_dataset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
483
+ lib/python3.12/site-packages/datasets/features/__pycache__/features.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
484
+ lib/python3.12/site-packages/torio/lib/libtorio_ffmpeg5.so filter=lfs diff=lfs merge=lfs -text
485
+ lib/python3.12/site-packages/torio/lib/libtorio_ffmpeg6.so filter=lfs diff=lfs merge=lfs -text
486
+ lib/python3.12/site-packages/torio/lib/_torio_ffmpeg5.so filter=lfs diff=lfs merge=lfs -text
487
+ lib/python3.12/site-packages/torio/lib/_torio_ffmpeg6.so filter=lfs diff=lfs merge=lfs -text
488
+ lib/python3.12/site-packages/torio/lib/libtorio_ffmpeg4.so filter=lfs diff=lfs merge=lfs -text
489
+ lib/python3.12/site-packages/torio/lib/_torio_ffmpeg4.so filter=lfs diff=lfs merge=lfs -text
490
+ lib/python3.12/site-packages/pyzmq.libs/libzmq-56587b1b.so.5.2.5 filter=lfs diff=lfs merge=lfs -text
491
+ lib/python3.12/site-packages/pyzmq.libs/libsodium-14725a37.so.26.2.0 filter=lfs diff=lfs merge=lfs -text
492
+ lib/python3.12/site-packages/attr/__pycache__/_make.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
493
+ lib/python3.12/site-packages/torch/bin/protoc filter=lfs diff=lfs merge=lfs -text
494
+ lib/python3.12/site-packages/torch/bin/protoc-3.13.0.0 filter=lfs diff=lfs merge=lfs -text
495
+ lib/python3.12/site-packages/torch/onnx/__pycache__/symbolic_opset9.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
496
+ lib/python3.12/site-packages/torch/nn/parallel/__pycache__/distributed.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
497
+ lib/python3.12/site-packages/torch/nn/modules/__pycache__/loss.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
498
+ lib/python3.12/site-packages/torch/nn/modules/__pycache__/module.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
499
+ lib/python3.12/site-packages/torch/nn/__pycache__/functional.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
500
+ lib/python3.12/site-packages/torch/_dynamo/variables/__pycache__/higher_order_ops.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
501
+ lib/python3.12/site-packages/torch/_dynamo/variables/__pycache__/builder.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
502
+ lib/python3.12/site-packages/torch/_dynamo/__pycache__/trace_rules.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
503
+ lib/python3.12/site-packages/torch/_dynamo/__pycache__/symbolic_convert.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
504
+ lib/python3.12/site-packages/torch/_dynamo/__pycache__/guards.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
505
+ lib/python3.12/site-packages/torch/_dynamo/__pycache__/output_graph.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
506
+ lib/python3.12/site-packages/torch/_dynamo/__pycache__/utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
507
+ lib/python3.12/site-packages/torch/utils/hipify/__pycache__/cuda_to_hip_mappings.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
508
+ lib/python3.12/site-packages/torch/utils/__pycache__/cpp_extension.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
509
+ lib/python3.12/site-packages/torch/backends/_nnapi/__pycache__/serializer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
510
+ lib/python3.12/site-packages/torch/nested/_internal/__pycache__/ops.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
511
+ lib/python3.12/site-packages/torch/testing/_internal/generated/__pycache__/annotated_fn_args.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
512
+ lib/python3.12/site-packages/torch/testing/_internal/opinfo/__pycache__/core.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
513
+ lib/python3.12/site-packages/torch/testing/_internal/__pycache__/common_methods_invocations.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
514
+ lib/python3.12/site-packages/torch/testing/_internal/__pycache__/common_utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
515
+ lib/python3.12/site-packages/torch/testing/_internal/__pycache__/common_modules.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
516
+ lib/python3.12/site-packages/torch/testing/_internal/__pycache__/common_nn.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
517
+ lib/python3.12/site-packages/torch/testing/_internal/__pycache__/common_quantization.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
518
+ lib/python3.12/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/dist_autograd_test.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
519
+ lib/python3.12/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/rpc_test.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
520
+ lib/python3.12/site-packages/torch/testing/_internal/distributed/__pycache__/distributed_test.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
521
+ lib/python3.12/site-packages/torch/lib/libc10_cuda.so filter=lfs diff=lfs merge=lfs -text
522
+ lib/python3.12/site-packages/torch/lib/libtorch.so filter=lfs diff=lfs merge=lfs -text
523
+ lib/python3.12/site-packages/torch/lib/libtorch_python.so filter=lfs diff=lfs merge=lfs -text
bin/deepspeed.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ae1bb31b9f6a65d503678a9a1c179866b0791be0c5d7a290050069a4438e33b
3
+ size 138
bin/ninja ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:696f9628a79d9ce50314cf9556d7cd1a1d1ec52b8fd52828f6f9db1719565b67
3
+ size 372384
lib/python3.12/site-packages/IPython/core/__pycache__/completer.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19f383c640f7f8b1670f082f0dcfceba6891039e584d7ba0ce95cfab2e151a48
3
+ size 138384
lib/python3.12/site-packages/IPython/core/__pycache__/interactiveshell.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94a525c3c84ae8f0a5daecf03f89fa46117f6a171709e883f2fd17e93cea2114
3
+ size 156014
lib/python3.12/site-packages/_yaml/__init__.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This is a stub package designed to roughly emulate the _yaml
2
+ # extension module, which previously existed as a standalone module
3
+ # and has been moved into the `yaml` package namespace.
4
+ # It does not perfectly mimic its old counterpart, but should get
5
+ # close enough for anyone who's relying on it even when they shouldn't.
6
+ import yaml
7
+
8
+ # in some circumstances, the yaml module we imoprted may be from a different version, so we need
9
+ # to tread carefully when poking at it here (it may not have the attributes we expect)
10
+ if not getattr(yaml, '__with_libyaml__', False):
11
+ from sys import version_info
12
+
13
+ exc = ModuleNotFoundError if version_info >= (3, 6) else ImportError
14
+ raise exc("No module named '_yaml'")
15
+ else:
16
+ from yaml._yaml import *
17
+ import warnings
18
+ warnings.warn(
19
+ 'The _yaml extension module is now located at yaml._yaml'
20
+ ' and its location is subject to change. To use the'
21
+ ' LibYAML-based parser and emitter, import from `yaml`:'
22
+ ' `from yaml import CLoader as Loader, CDumper as Dumper`.',
23
+ DeprecationWarning
24
+ )
25
+ del warnings
26
+ # Don't `del yaml` here because yaml is actually an existing
27
+ # namespace member of _yaml.
28
+
29
+ __name__ = '_yaml'
30
+ # If the module is top-level (i.e. not a part of any specific package)
31
+ # then the attribute should be set to ''.
32
+ # https://docs.python.org/3.8/library/types.html
33
+ __package__ = ''
lib/python3.12/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (866 Bytes). View file
 
lib/python3.12/site-packages/absl/testing/__pycache__/absltest.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e62272a062e8e49a48ff9f414540b680215c670f90f3bb519fc6fc2385bf3e9
3
+ size 120999
lib/python3.12/site-packages/attr/__pycache__/_make.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:222ebcb0a8ff4922dac40b4232b4eeaedbc100324d6c128b7d65587a116fc525
3
+ size 107025
lib/python3.12/site-packages/certifi-2026.1.4.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
lib/python3.12/site-packages/certifi-2026.1.4.dist-info/METADATA ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: certifi
3
+ Version: 2026.1.4
4
+ Summary: Python package for providing Mozilla's CA Bundle.
5
+ Home-page: https://github.com/certifi/python-certifi
6
+ Author: Kenneth Reitz
7
+ Author-email: me@kennethreitz.com
8
+ License: MPL-2.0
9
+ Project-URL: Source, https://github.com/certifi/python-certifi
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
13
+ Classifier: Natural Language :: English
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Requires-Python: >=3.7
26
+ License-File: LICENSE
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: home-page
32
+ Dynamic: license
33
+ Dynamic: license-file
34
+ Dynamic: project-url
35
+ Dynamic: requires-python
36
+ Dynamic: summary
37
+
38
+ Certifi: Python SSL Certificates
39
+ ================================
40
+
41
+ Certifi provides Mozilla's carefully curated collection of Root Certificates for
42
+ validating the trustworthiness of SSL certificates while verifying the identity
43
+ of TLS hosts. It has been extracted from the `Requests`_ project.
44
+
45
+ Installation
46
+ ------------
47
+
48
+ ``certifi`` is available on PyPI. Simply install it with ``pip``::
49
+
50
+ $ pip install certifi
51
+
52
+ Usage
53
+ -----
54
+
55
+ To reference the installed certificate authority (CA) bundle, you can use the
56
+ built-in function::
57
+
58
+ >>> import certifi
59
+
60
+ >>> certifi.where()
61
+ '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'
62
+
63
+ Or from the command line::
64
+
65
+ $ python -m certifi
66
+ /usr/local/lib/python3.7/site-packages/certifi/cacert.pem
67
+
68
+ Enjoy!
69
+
70
+ .. _`Requests`: https://requests.readthedocs.io/en/master/
71
+
72
+ Addition/Removal of Certificates
73
+ --------------------------------
74
+
75
+ Certifi does not support any addition/removal or other modification of the
76
+ CA trust store content. This project is intended to provide a reliable and
77
+ highly portable root of trust to python deployments. Look to upstream projects
78
+ for methods to use alternate trust.
lib/python3.12/site-packages/certifi-2026.1.4.dist-info/RECORD ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ certifi-2026.1.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ certifi-2026.1.4.dist-info/METADATA,sha256=FSfJEfKuMo6bJlofUrtRpn4PFTYtbYyXpHN_A3ZFpIY,2473
3
+ certifi-2026.1.4.dist-info/RECORD,,
4
+ certifi-2026.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ certifi-2026.1.4.dist-info/licenses/LICENSE,sha256=6TcW2mucDVpKHfYP5pWzcPBpVgPSH2-D8FPkLPwQyvc,989
6
+ certifi-2026.1.4.dist-info/top_level.txt,sha256=KMu4vUCfsjLrkPbSNdgdekS-pVJzBAJFO__nI8NF6-U,8
7
+ certifi/__init__.py,sha256=969deMMS7Uchipr0oO4dbRBUvRi0uNYCn07VmG1aTrg,94
8
+ certifi/__main__.py,sha256=xBBoj905TUWBLRGANOcf7oi6e-3dMP4cEoG9OyMs11g,243
9
+ certifi/__pycache__/__init__.cpython-312.pyc,,
10
+ certifi/__pycache__/__main__.cpython-312.pyc,,
11
+ certifi/__pycache__/core.cpython-312.pyc,,
12
+ certifi/cacert.pem,sha256=Tzl1_zCrvzVEO0hgZK6Ly0Hf9wf_31dsdtKS-0WKoKk,270954
13
+ certifi/core.py,sha256=XFXycndG5pf37ayeF8N32HUuDafsyhkVMbO4BAPWHa0,3394
14
+ certifi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
lib/python3.12/site-packages/certifi-2026.1.4.dist-info/WHEEL ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
lib/python3.12/site-packages/certifi-2026.1.4.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ This package contains a modified version of ca-bundle.crt:
2
+
3
+ ca-bundle.crt -- Bundle of CA Root Certificates
4
+
5
+ This is a bundle of X.509 certificates of public Certificate Authorities
6
+ (CA). These were automatically extracted from Mozilla's root certificates
7
+ file (certdata.txt). This file can be found in the mozilla source tree:
8
+ https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt
9
+ It contains the certificates in PEM format and therefore
10
+ can be directly used with curl / libcurl / php_curl, or with
11
+ an Apache+mod_ssl webserver for SSL client authentication.
12
+ Just configure this file as the SSLCACertificateFile.#
13
+
14
+ ***** BEGIN LICENSE BLOCK *****
15
+ This Source Code Form is subject to the terms of the Mozilla Public License,
16
+ v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
17
+ one at http://mozilla.org/MPL/2.0/.
18
+
19
+ ***** END LICENSE BLOCK *****
20
+ @(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
lib/python3.12/site-packages/certifi-2026.1.4.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ certifi
lib/python3.12/site-packages/cusparselt/lib/libcusparseLt.so.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42385f413fe87ce1c844b13890f920b66873dbd36030a3b0fd2c143d722f6879
3
+ size 212602113
lib/python3.12/site-packages/datasets/__pycache__/arrow_dataset.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ca190052b1674e451855d25a25f8bddddd8e1df83bce4d8614d1553d3e93163
3
+ size 304251
lib/python3.12/site-packages/datasets/__pycache__/dataset_dict.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b62906f4e998cc35e21fad755ad9ddc2ab87ae20d9eed99e1fd37532aa9fd7da
3
+ size 115763
lib/python3.12/site-packages/datasets/__pycache__/iterable_dataset.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9de0375d04e581c293cd6526acf23f5f819e858666469673bb730e85aad3f1d
3
+ size 191305
lib/python3.12/site-packages/datasets/__pycache__/table.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed415b689c46a2b0257b790eb01222f0d5fd62908785f35f79a858403ab11ba9
3
+ size 112721
lib/python3.12/site-packages/datasets/features/__pycache__/features.cpython-312.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a07dc4cbba2b5725cfac1aaff539a6bb8386929cb1ee8bc10a84d359149d3fa
3
+ size 116443
lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/METADATA ADDED
@@ -0,0 +1,443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: deepspeed
3
+ Version: 0.17.0
4
+ Summary: DeepSpeed library
5
+ Home-page: http://deepspeed.ai
6
+ Author: DeepSpeed Team
7
+ Author-email: deepspeed-info@microsoft.com
8
+ License: Apache Software License 2.0
9
+ Project-URL: Documentation, https://deepspeed.readthedocs.io
10
+ Project-URL: Source, https://github.com/deepspeedai/DeepSpeed
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: einops
19
+ Requires-Dist: hjson
20
+ Requires-Dist: msgpack
21
+ Requires-Dist: ninja
22
+ Requires-Dist: numpy
23
+ Requires-Dist: packaging>=20.0
24
+ Requires-Dist: psutil
25
+ Requires-Dist: py-cpuinfo
26
+ Requires-Dist: pydantic>=2.0.0
27
+ Requires-Dist: torch
28
+ Requires-Dist: tqdm
29
+ Provides-Extra: 1bit
30
+ Provides-Extra: 1bit-mpi
31
+ Requires-Dist: mpi4py; extra == "1bit-mpi"
32
+ Provides-Extra: readthedocs
33
+ Requires-Dist: autodoc_pydantic>=2.0.0; extra == "readthedocs"
34
+ Requires-Dist: docutils<0.18; extra == "readthedocs"
35
+ Requires-Dist: hjson; extra == "readthedocs"
36
+ Requires-Dist: packaging; extra == "readthedocs"
37
+ Requires-Dist: psutil; extra == "readthedocs"
38
+ Requires-Dist: py-cpuinfo; extra == "readthedocs"
39
+ Requires-Dist: pydantic>=2.0.0; extra == "readthedocs"
40
+ Requires-Dist: recommonmark; extra == "readthedocs"
41
+ Requires-Dist: sphinx_rtd_theme; extra == "readthedocs"
42
+ Requires-Dist: torch; extra == "readthedocs"
43
+ Requires-Dist: tqdm; extra == "readthedocs"
44
+ Provides-Extra: dev
45
+ Requires-Dist: accelerate; extra == "dev"
46
+ Requires-Dist: clang-format==18.1.3; extra == "dev"
47
+ Requires-Dist: comet_ml>=3.41.0; extra == "dev"
48
+ Requires-Dist: deepspeed-kernels; sys_platform == "linux" and extra == "dev"
49
+ Requires-Dist: docutils<0.18; extra == "dev"
50
+ Requires-Dist: future; extra == "dev"
51
+ Requires-Dist: importlib-metadata>=4; extra == "dev"
52
+ Requires-Dist: mup; extra == "dev"
53
+ Requires-Dist: pre-commit>=3.2.0; extra == "dev"
54
+ Requires-Dist: pytest>=7.2.0; extra == "dev"
55
+ Requires-Dist: pytest-forked; extra == "dev"
56
+ Requires-Dist: pytest-randomly; extra == "dev"
57
+ Requires-Dist: pytest-xdist; extra == "dev"
58
+ Requires-Dist: qtorch==0.3.0; extra == "dev"
59
+ Requires-Dist: recommonmark; extra == "dev"
60
+ Requires-Dist: sphinx; extra == "dev"
61
+ Requires-Dist: sphinx-rtd-theme; extra == "dev"
62
+ Requires-Dist: tensorboard; extra == "dev"
63
+ Requires-Dist: torchvision; extra == "dev"
64
+ Requires-Dist: transformers>=4.51.3; extra == "dev"
65
+ Requires-Dist: wandb; extra == "dev"
66
+ Provides-Extra: autotuning
67
+ Requires-Dist: tabulate; extra == "autotuning"
68
+ Provides-Extra: autotuning-ml
69
+ Requires-Dist: hjson; extra == "autotuning-ml"
70
+ Requires-Dist: tabulate; extra == "autotuning-ml"
71
+ Requires-Dist: xgboost; extra == "autotuning-ml"
72
+ Provides-Extra: sparse-attn
73
+ Requires-Dist: triton==1.0.0; extra == "sparse-attn"
74
+ Provides-Extra: sparse
75
+ Requires-Dist: neural-compressor==2.1.0; extra == "sparse"
76
+ Provides-Extra: inf
77
+ Requires-Dist: google; extra == "inf"
78
+ Requires-Dist: lm-eval==0.3.0; extra == "inf"
79
+ Requires-Dist: protobuf; extra == "inf"
80
+ Requires-Dist: qtorch; extra == "inf"
81
+ Requires-Dist: safetensors; extra == "inf"
82
+ Requires-Dist: sentencepiece; extra == "inf"
83
+ Requires-Dist: transformers>=4.32.1; extra == "inf"
84
+ Provides-Extra: sd
85
+ Requires-Dist: diffusers>=0.25.0; extra == "sd"
86
+ Requires-Dist: triton>=2.1.0; extra == "sd"
87
+ Provides-Extra: triton
88
+ Requires-Dist: triton==2.1.0; extra == "triton"
89
+ Provides-Extra: deepcompile
90
+ Requires-Dist: scipy; extra == "deepcompile"
91
+ Provides-Extra: all
92
+ Requires-Dist: mpi4py; extra == "all"
93
+ Requires-Dist: deepspeed-kernels; sys_platform == "linux" and extra == "all"
94
+ Requires-Dist: torch; extra == "all"
95
+ Requires-Dist: transformers>=4.51.3; extra == "all"
96
+ Requires-Dist: tensorboard; extra == "all"
97
+ Requires-Dist: pytest>=7.2.0; extra == "all"
98
+ Requires-Dist: protobuf; extra == "all"
99
+ Requires-Dist: packaging; extra == "all"
100
+ Requires-Dist: google; extra == "all"
101
+ Requires-Dist: qtorch; extra == "all"
102
+ Requires-Dist: triton==1.0.0; extra == "all"
103
+ Requires-Dist: xgboost; extra == "all"
104
+ Requires-Dist: future; extra == "all"
105
+ Requires-Dist: docutils<0.18; extra == "all"
106
+ Requires-Dist: scipy; extra == "all"
107
+ Requires-Dist: recommonmark; extra == "all"
108
+ Requires-Dist: tqdm; extra == "all"
109
+ Requires-Dist: qtorch==0.3.0; extra == "all"
110
+ Requires-Dist: diffusers>=0.25.0; extra == "all"
111
+ Requires-Dist: triton>=2.1.0; extra == "all"
112
+ Requires-Dist: triton==2.1.0; extra == "all"
113
+ Requires-Dist: autodoc_pydantic>=2.0.0; extra == "all"
114
+ Requires-Dist: wandb; extra == "all"
115
+ Requires-Dist: clang-format==18.1.3; extra == "all"
116
+ Requires-Dist: sentencepiece; extra == "all"
117
+ Requires-Dist: lm-eval==0.3.0; extra == "all"
118
+ Requires-Dist: comet_ml>=3.41.0; extra == "all"
119
+ Requires-Dist: pre-commit>=3.2.0; extra == "all"
120
+ Requires-Dist: safetensors; extra == "all"
121
+ Requires-Dist: transformers>=4.32.1; extra == "all"
122
+ Requires-Dist: pydantic>=2.0.0; extra == "all"
123
+ Requires-Dist: pytest-forked; extra == "all"
124
+ Requires-Dist: pytest-randomly; extra == "all"
125
+ Requires-Dist: sphinx; extra == "all"
126
+ Requires-Dist: pytest-xdist; extra == "all"
127
+ Requires-Dist: sphinx_rtd_theme; extra == "all"
128
+ Requires-Dist: importlib-metadata>=4; extra == "all"
129
+ Requires-Dist: hjson; extra == "all"
130
+ Requires-Dist: sphinx-rtd-theme; extra == "all"
131
+ Requires-Dist: py-cpuinfo; extra == "all"
132
+ Requires-Dist: accelerate; extra == "all"
133
+ Requires-Dist: tabulate; extra == "all"
134
+ Requires-Dist: mup; extra == "all"
135
+ Requires-Dist: neural-compressor==2.1.0; extra == "all"
136
+ Requires-Dist: torchvision; extra == "all"
137
+ Requires-Dist: psutil; extra == "all"
138
+ Dynamic: author
139
+ Dynamic: author-email
140
+ Dynamic: classifier
141
+ Dynamic: description
142
+ Dynamic: description-content-type
143
+ Dynamic: home-page
144
+ Dynamic: license
145
+ Dynamic: license-file
146
+ Dynamic: project-url
147
+ Dynamic: provides-extra
148
+ Dynamic: requires-dist
149
+ Dynamic: summary
150
+
151
+ [![License Apache 2.0](https://badgen.net/badge/license/apache2.0/blue)](https://github.com/deepspeedai/DeepSpeed/blob/master/LICENSE)
152
+ [![PyPI version](https://badge.fury.io/py/deepspeed.svg)](https://pypi.org/project/deepspeed/)
153
+ [![Downloads](https://static.pepy.tech/badge/deepspeed)](https://pepy.tech/project/deepspeed)
154
+ [![Build](https://badgen.net/badge/build/check-status/blue)](#build-pipeline-status)
155
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9530/badge)](https://www.bestpractices.dev/projects/9530)
156
+ [![Twitter](https://img.shields.io/twitter/follow/DeepSpeedAI)](https://twitter.com/intent/follow?screen_name=DeepSpeedAI)
157
+ [![Japanese Twitter](https://img.shields.io/badge/%E6%97%A5%E6%9C%AC%E8%AA%9ETwitter-%40DeepSpeedAI_JP-blue)](https://twitter.com/DeepSpeedAI_JP)
158
+ [![Chinese Zhihu](https://img.shields.io/badge/%E7%9F%A5%E4%B9%8E-%E5%BE%AE%E8%BD%AFDeepSpeed-blue)](https://www.zhihu.com/people/deepspeed)
159
+
160
+
161
+ <div align="center">
162
+ <img src="docs/assets/images/DeepSpeed_light.svg#gh-light-mode-only" width="400px">
163
+ <img src="docs/assets/images/DeepSpeed_dark_transparent.svg#gh-dark-mode-only" width="400px">
164
+ </div>
165
+
166
+ ## Latest News
167
+ <b> <span style="color:orange" > DeepSpeed empowers ChatGPT-like model training with a single click, offering 15x speedup over SOTA RLHF systems with unprecedented cost reduction at all scales; [learn how](https://github.com/deepspeedai/DeepSpeed/tree/master/blogs/deepspeed-chat)</span>.</b>
168
+ * [2025/04] [DeepCompile: Unlocking Compiler Optimization for Distributed Training](https://github.com/deepspeedai/DeepSpeed/blob/master/blogs/deepcompile/README.md)
169
+ * [2025/03] [DeepSpeed-AutoTP: Automatic Tensor Parallel Training of Hugging Face models](https://github.com/deepspeedai/DeepSpeed/blob/master/blogs/huggingface-tp/README.md)
170
+ * [2024/12] [Ulysses-Offload: Democratizing Long Context LLM Training ](https://github.com/deepspeedai/DeepSpeed/blob/master/blogs/ulysses-offload/README.md)
171
+ * [2024/12] [DeepSpeed-Domino: Communication-Free LLM Training Engine](https://github.com/deepspeedai/DeepSpeed/blob/master/blogs/deepspeed-domino/README.md)
172
+ * [2024/08] [DeepSpeed on Windows](https://github.com/deepspeedai/DeepSpeed/tree/master/blogs/windows/08-2024/README.md) [[日本語](https://github.com/deepspeedai/DeepSpeed/tree/master/blogs/windows/08-2024/japanese/README.md)] [[中文](https://github.com/deepspeedai/DeepSpeed/tree/master/blogs/windows/08-2024/chinese/README.md)]
173
+
174
+ <!-- NOTE: we must use html for news items otherwise links will be broken in the 'more news' section -->
175
+ <details>
176
+ <summary>More news</summary>
177
+ <ul>
178
+ <li> [2024/08] <a href="https://github.com/deepspeedai/DeepSpeed/blob/master/blogs/deepspeed-gds/README.md"> DeepNVMe: Improving DL Applications through I/O Optimizations</a> [<a href="ttps://github.com/deepspeedai/DeepSpeed/blob/master/blogs/deepspeed-gds/japanese/README.md"> 日本語 </a>] [<a href="https://github.com/deepspeedai/DeepSpeed/blob/master/blogs/deepspeed-gds/japanese/README.md"> 中文 </a>]</li>
179
+
180
+ <li> [2024/07] <a href="https://github.com/microsoft/DeepSpeed/tree/master/blogs/deepspeed-ucp/README.md"> DeepSpeed Universal Checkpointing: Efficient and Flexible Checkpointing for Large Scale Distributed Training</a> [<a href="https://github.com/microsoft/DeepSpeed/tree/master/blogs/deepspeed-ucp/japanese/README.md"> 日本語 </a>] </li>
181
+
182
+ <li> [2024/03] <a href="https://github.com/microsoft/DeepSpeed/tree/master/blogs/deepspeed-fp6/03-05-2024/README.md"> DeepSpeed-FP6: The Power of FP6-Centric Serving for Large Language Models</a> [<a href="https://github.com/microsoft/DeepSpeed/tree/master/blogs/deepspeed-fp6/03-05-2024/README-Chinese.md"> 中文 </a>] </li>
183
+
184
+ </ul>
185
+ </details>
186
+
187
+ ---
188
+
189
+ # Extreme Speed and Scale for DL Training and Inference
190
+
191
+ ***[DeepSpeed](https://www.deepspeed.ai/) enabled the world's most powerful language models (at the time of this writing) such as [MT-530B](https://www.microsoft.com/en-us/research/blog/using-deepspeed-and-megatron-to-train-megatron-turing-nlg-530b-the-worlds-largest-and-most-powerful-generative-language-model/) and [BLOOM](https://huggingface.co/blog/bloom-megatron-deepspeed)***. It is an easy-to-use deep learning optimization software suite that powers unprecedented scale and speed for both training and inference. With DeepSpeed you can:
192
+
193
+ * Train/Inference dense or sparse models with billions or trillions of parameters
194
+ * Achieve excellent system throughput and efficiently scale to thousands of GPUs
195
+ * Train/Inference on resource constrained GPU systems
196
+ * Achieve unprecedented low latency and high throughput for inference
197
+ * Achieve extreme compression for an unparalleled inference latency and model size reduction with low costs
198
+
199
+ ---
200
+
201
+ # DeepSpeed's four innovation pillars
202
+
203
+ <img src="docs/assets/images/DeepSpeed-pillars.png" width="800px">
204
+
205
+
206
+ ## DeepSpeed-Training
207
+
208
+ DeepSpeed offers a confluence of system innovations, that has made large scale DL training effective, and efficient, greatly improved ease of use, and redefined the DL training landscape in terms of scale that is possible. These innovations such as ZeRO, 3D-Parallelism, DeepSpeed-MoE, ZeRO-Infinity, etc. fall under the training pillar. Learn more: [DeepSpeed-Training](https://www.deepspeed.ai/training/)
209
+
210
+ ## DeepSpeed-Inference
211
+
212
+ DeepSpeed brings together innovations in parallelism technology such as tensor, pipeline, expert and ZeRO-parallelism, and combines them with high performance custom inference kernels, communication optimizations and heterogeneous memory technologies to enable inference at an unprecedented scale, while achieving unparalleled latency, throughput and cost reduction. This systematic composition of system technologies for inference falls under the inference pillar. Learn more: [DeepSpeed-Inference](https://www.deepspeed.ai/inference)
213
+
214
+
215
+ ## DeepSpeed-Compression
216
+
217
+ To further increase the inference efficiency, DeepSpeed offers easy-to-use and flexible-to-compose compression techniques for researchers and practitioners to compress their models while delivering faster speed, smaller model size, and significantly reduced compression cost. Moreover, SoTA innovations on compression like ZeroQuant and XTC are included under the compression pillar. Learn more: [DeepSpeed-Compression](https://www.deepspeed.ai/compression)
218
+
219
+ ## DeepSpeed4Science
220
+
221
+ In line with Microsoft's mission to solve humanity's most pressing challenges, the DeepSpeed team at Microsoft is responding to this opportunity by launching a new initiative called *DeepSpeed4Science*, aiming to build unique capabilities through AI system technology innovations to help domain experts to unlock today's biggest science mysteries. Learn more: [tutorials](https://www.deepspeed.ai/deepspeed4science/)
222
+
223
+ ---
224
+
225
+ # DeepSpeed Software Suite
226
+
227
+ ## DeepSpeed Library
228
+
229
+ The [DeepSpeed](https://github.com/deepspeedai/deepspeed) library (this repository) implements and packages the innovations and technologies in DeepSpeed Training, Inference and Compression Pillars into a single easy-to-use, open-sourced repository. It allows for easy composition of multitude of features within a single training, inference or compression pipeline. The DeepSpeed Library is heavily adopted by the DL community, and has been used to enable some of the most powerful models (see [DeepSpeed Adoption](#deepspeed-adoption)).
230
+
231
+ ## Model Implementations for Inference (MII)
232
+
233
+ [Model Implementations for Inference (MII)](https://github.com/deepspeedai/deepspeed-mii) is an open-sourced repository for making low-latency and high-throughput inference accessible to all data scientists by alleviating the need to apply complex system optimization techniques themselves. Out-of-box, MII offers support for thousands of widely used DL models, optimized using DeepSpeed-Inference, that can be deployed with a few lines of code, while achieving significant latency reduction compared to their vanilla open-sourced versions.
234
+
235
+ ## DeepSpeed on Azure
236
+
237
+ DeepSpeed users are diverse and have access to different environments. We recommend to try DeepSpeed on Azure as it is the simplest and easiest method. The recommended method to try DeepSpeed on Azure is through AzureML [recipes](https://github.com/Azure/azureml-examples/tree/main/v1/python-sdk/workflows/train/deepspeed). The job submission and data preparation scripts have been made available [here](https://github.com/deepspeedai/Megatron-DeepSpeed/tree/main/examples_deepspeed/azureml). For more details on how to use DeepSpeed on Azure, please follow the [Azure tutorial](https://www.deepspeed.ai/tutorials/azure/).
238
+
239
+ ---
240
+
241
+ # DeepSpeed Adoption
242
+
243
+ DeepSpeed was an important part of Microsoft’s
244
+ [AI at Scale](https://www.microsoft.com/en-us/research/project/ai-at-scale/)
245
+ initiative to enable next-generation AI capabilities at scale, where you can find more
246
+ information [here](https://innovation.microsoft.com/en-us/exploring-ai-at-scale).
247
+
248
+ DeepSpeed has been used to train many different large-scale models, below is a list of several examples that we are aware of (if you'd like to include your model please submit a PR):
249
+
250
+ * [Megatron-Turing NLG (530B)](https://www.microsoft.com/en-us/research/blog/using-deepspeed-and-megatron-to-train-megatron-turing-nlg-530b-the-worlds-largest-and-most-powerful-generative-language-model/)
251
+ * [Jurassic-1 (178B)](https://uploads-ssl.webflow.com/60fd4503684b466578c0d307/61138924626a6981ee09caf6_jurassic_tech_paper.pdf)
252
+ * [BLOOM (176B)](https://huggingface.co/blog/bloom-megatron-deepspeed)
253
+ * [GLM (130B)](https://github.com/THUDM/GLM-130B)
254
+ * [xTrimoPGLM (100B)](https://www.biorxiv.org/content/10.1101/2023.07.05.547496v2)
255
+ * [YaLM (100B)](https://github.com/yandex/YaLM-100B)
256
+ * [GPT-NeoX (20B)](https://github.com/EleutherAI/gpt-neox)
257
+ * [AlexaTM (20B)](https://www.amazon.science/blog/20b-parameter-alexa-model-sets-new-marks-in-few-shot-learning)
258
+ * [Turing NLG (17B)](https://www.microsoft.com/en-us/research/blog/turing-nlg-a-17-billion-parameter-language-model-by-microsoft/)
259
+ * [METRO-LM (5.4B)](https://arxiv.org/pdf/2204.06644.pdf)
260
+
261
+ DeepSpeed has been integrated with several different popular open-source DL frameworks such as:
262
+
263
+ | | Documentation |
264
+ | ---------------------------------------------------------------------------------------------- | -------------------------------------------- |
265
+ <img src="docs/assets/images/transformers-light.png#gh-light-mode-only" width="250px"><img src="docs/assets/images/transformers-dark.png#gh-dark-mode-only" width="250px"> | [Transformers with DeepSpeed](https://huggingface.co/docs/transformers/deepspeed) |
266
+ | <img src="docs/assets/images/accelerate-light.png#gh-light-mode-only" width="250px"><img src="docs/assets/images/accelerate-dark.png#gh-dark-mode-only" width="250px"> | [Accelerate with DeepSpeed](https://huggingface.co/docs/accelerate/usage_guides/deepspeed) |
267
+ | <img src="docs/assets/images/lightning-light.svg#gh-light-mode-only" width="200px"><img src="docs/assets/images/lightning-dark.svg#gh-dark-mode-only" width="200px"> | [Lightning with DeepSpeed](https://lightning.ai/docs/pytorch/stable/advanced/model_parallel.html#deepspeed) |
268
+ | <img src="docs/assets/images/mosaicml.svg" width="200px"> | [MosaicML with DeepSpeed](https://docs.mosaicml.com/projects/composer/en/latest/trainer/using_the_trainer.html?highlight=deepspeed#deepspeed-integration) |
269
+ | <img src="docs/assets/images/determined.svg" width="225px"> | [Determined with DeepSpeed](https://docs.determined.ai/latest/training/apis-howto/deepspeed/overview.html) |
270
+ | <img src="https://user-images.githubusercontent.com/58739961/187154444-fce76639-ac8d-429b-9354-c6fac64b7ef8.jpg" width=150> | [MMEngine with DeepSpeed](https://mmengine.readthedocs.io/en/latest/common_usage/large_model_training.html#deepspeed) |
271
+
272
+ ---
273
+
274
+ # Build Pipeline Status
275
+
276
+ | Description | Status |
277
+ | ----------- | ------ |
278
+ | NVIDIA | [![nv-torch110-p40](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-torch110-p40.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-torch110-p40.yml) [![nv-torch110-v100](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-torch110-v100.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-torch110-v100.yml) [![nv-torch-latest-v100](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-torch-latest-v100.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-torch-latest-v100.yml) [![nv-h100](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-h100.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-h100.yml) [![nv-inference](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-inference.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-inference.yml) [![nv-nightly](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-nightly.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-nightly.yml) |
279
+ | AMD | [![amd-mi200](https://github.com/deepspeedai/DeepSpeed/actions/workflows/amd-mi200.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/amd-mi200.yml) |
280
+ | CPU | [![torch-latest-cpu](https://github.com/deepspeedai/DeepSpeed/actions/workflows/cpu-torch-latest.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/cpu-torch-latest.yml) [![cpu-inference](https://github.com/deepspeedai/DeepSpeed/actions/workflows/cpu-inference.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/cpu-inference.yml) |
281
+ | Intel Gaudi | [![hpu-gaudi2](https://github.com/deepspeedai/DeepSpeed/actions/workflows/hpu-gaudi2.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/hpu-gaudi2.yml) |
282
+ | Intel XPU | [![xpu-max1100](https://github.com/deepspeedai/DeepSpeed/actions/workflows/xpu-max1100.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/xpu-max1100.yml) |
283
+ | PyTorch Nightly | [![nv-torch-nightly-v100](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-torch-nightly-v100.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-torch-nightly-v100.yml) |
284
+ | Integrations | [![nv-transformers-v100](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-transformers-v100.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-transformers-v100.yml) [![nv-lightning-v100](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-lightning-v100.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-lightning-v100.yml) [![nv-accelerate-v100](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-accelerate-v100.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-accelerate-v100.yml) [![nv-mii](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-mii.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-mii.yml) [![nv-ds-chat](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-ds-chat.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-ds-chat.yml) [![nv-sd](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-sd.yml/badge.svg)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/nv-sd.yml) |
285
+ | Misc | [![Formatting](https://github.com/deepspeedai/DeepSpeed/actions/workflows/formatting.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/formatting.yml) [![pages-build-deployment](https://github.com/deepspeedai/DeepSpeed/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/pages/pages-build-deployment) [![Documentation Status](https://readthedocs.org/projects/deepspeed/badge/?version=latest)](https://deepspeed.readthedocs.io/en/latest/?badge=latest)[![python](https://github.com/deepspeedai/DeepSpeed/actions/workflows/python.yml/badge.svg?branch=master)](https://github.com/deepspeedai/DeepSpeed/actions/workflows/python.yml) |
286
+ | Huawei Ascend NPU | [![Huawei Ascend NPU](https://github.com/Ascend/Ascend-CI/actions/workflows/deepspeed.yaml/badge.svg?branch=main)](https://github.com/Ascend/Ascend-CI/actions/workflows/deepspeed.yaml) |
287
+
288
+ # Installation
289
+
290
+ The quickest way to get started with DeepSpeed is via pip, this will install
291
+ the latest release of DeepSpeed which is not tied to specific PyTorch or CUDA
292
+ versions. DeepSpeed includes several C++/CUDA extensions that we commonly refer
293
+ to as our 'ops'. By default, all of these extensions/ops will be built
294
+ just-in-time (JIT) using [torch's JIT C++ extension loader that relies on
295
+ ninja](https://pytorch.org/docs/stable/cpp_extension.html) to build and
296
+ dynamically link them at runtime.
297
+
298
+ ## Requirements
299
+ * [PyTorch](https://pytorch.org/) must be installed _before_ installing DeepSpeed.
300
+ * For full feature support we recommend a version of PyTorch that is >= 1.9 and ideally the latest PyTorch stable release.
301
+ * A CUDA or ROCm compiler such as [nvcc](https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#introduction) or [hipcc](https://github.com/ROCm-Developer-Tools/HIPCC) used to compile C++/CUDA/HIP extensions.
302
+ * Specific GPUs we develop and test against are listed below, this doesn't mean your GPU will not work if it doesn't fall into this category it's just DeepSpeed is most well tested on the following:
303
+ * NVIDIA: Pascal, Volta, Ampere, and Hopper architectures
304
+ * AMD: MI100 and MI200
305
+
306
+ ## Contributed HW support
307
+ * DeepSpeed now support various HW accelerators.
308
+
309
+ | Contributor | Hardware | Accelerator Name | Contributor validated | Upstream validated |
310
+ |-------------|-------------------------------------|------------------| --------------------- |--------------------|
311
+ | Huawei | Huawei Ascend NPU | npu | Yes | No |
312
+ | Intel | Intel(R) Gaudi(R) 2 AI accelerator | hpu | Yes | Yes |
313
+ | Intel | Intel(R) Xeon(R) Processors | cpu | Yes | Yes |
314
+ | Intel | Intel(R) Data Center GPU Max series | xpu | Yes | Yes |
315
+ | Tecorigin | Scalable Data Analytics Accelerator | sdaa | Yes | No |
316
+
317
+ ## PyPI
318
+ We regularly push releases to [PyPI](https://pypi.org/project/deepspeed/) and encourage users to install from there in most cases.
319
+
320
+ ```bash
321
+ pip install deepspeed
322
+ ```
323
+
324
+ After installation, you can validate your install and see which extensions/ops
325
+ your machine is compatible with via the DeepSpeed environment report.
326
+
327
+ ```bash
328
+ ds_report
329
+ ```
330
+
331
+ If you would like to pre-install any of the DeepSpeed extensions/ops (instead
332
+ of JIT compiling) or install pre-compiled ops via PyPI please see our [advanced
333
+ installation instructions](https://www.deepspeed.ai/tutorials/advanced-install/).
334
+
335
+ ## Windows
336
+ Many DeepSpeed features are supported on Windows for both training and inference. You can read more about this in the original blog post [here](https://github.com/deepspeedai/DeepSpeed/tree/master/blogs/windows/08-2024/README.md). Among features that are currently not supported are async io (AIO) and GDS (which does not support Windows).
337
+ 1. Install PyTorch, such as pytorch 2.3+cu121.
338
+ 2. Install Visual C++ build tools, such as VS2022 C++ x64/x86 build tools.
339
+ 3. Launch Cmd console with Administrator permissions for creating required symlink folders and ensure MSVC tools are added to your PATH or launch the Developer Command Prompt for Visual Studio 2022 with administrator permissions.
340
+ 4. Run `build_win.bat` to build wheel in `dist` folder.
341
+
342
+ # Features
343
+
344
+ Please checkout [DeepSpeed-Training](https://www.deepspeed.ai/training), [DeepSpeed-Inference](https://www.deepspeed.ai/inference) and [DeepSpeed-Compression](https://www.deepspeed.ai/compression) pages for full set of features offered along each of these three pillars.
345
+
346
+ # Further Reading
347
+
348
+ All DeepSpeed documentation, tutorials, and blogs can be found on our website: [deepspeed.ai](https://www.deepspeed.ai/)
349
+
350
+
351
+ | | Description |
352
+ | ---------------------------------------------------------------------------------------------- | -------------------------------------------- |
353
+ | [Getting Started](https://www.deepspeed.ai/getting-started/) | First steps with DeepSpeed |
354
+ | [DeepSpeed JSON Configuration](https://www.deepspeed.ai/docs/config-json/) | Configuring DeepSpeed |
355
+ | [API Documentation](https://deepspeed.readthedocs.io/en/latest/) | Generated DeepSpeed API documentation |
356
+ | [Tutorials](https://www.deepspeed.ai/tutorials/) | Tutorials |
357
+ | [Blogs](https://www.deepspeed.ai/posts/) | Blogs |
358
+
359
+
360
+ # Contributing
361
+ DeepSpeed welcomes your contributions! Please see our
362
+ [contributing](CONTRIBUTING.md) guide for more details on formatting, testing,
363
+ etc.<br/>
364
+ Thanks so much to all of our amazing contributors!
365
+
366
+ <a href="https://github.com/deepspeedai/DeepSpeed/graphs/contributors">
367
+ <img src="https://contrib.rocks/image?repo=microsoft/DeepSpeed&r=" width="800px"/>
368
+ </a>
369
+
370
+ ## Contributor License Agreement
371
+ This project welcomes contributions and suggestions. Most contributions require you to
372
+ agree to a Contributor License Agreement (CLA) declaring that you have the right to, and
373
+ actually do, grant us the rights to use your contribution. For details, visit
374
+ https://cla.opensource.microsoft.com.
375
+
376
+ When you submit a pull request, a CLA bot will automatically determine whether you need
377
+ to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply
378
+ follow the instructions provided by the bot. You will only need to do this once across
379
+ all repos using our CLA.
380
+
381
+ ## Code of Conduct
382
+ This project has adopted the [Microsoft Open Source Code of
383
+ Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the
384
+ [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
385
+ [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
386
+
387
+ # Publications
388
+ 1. Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong He. (2019) ZeRO: memory optimizations toward training trillion parameter models. [arXiv:1910.02054](https://arxiv.org/abs/1910.02054) and [In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC '20)](https://dl.acm.org/doi/10.5555/3433701.3433727).
389
+ 2. Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and Yuxiong He. (2020) DeepSpeed: System Optimizations Enable Training Deep Learning Models with Over 100 Billion Parameters. [In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD '20, Tutorial)](https://dl.acm.org/doi/10.1145/3394486.3406703).
390
+ 3. Minjia Zhang, Yuxiong He. (2020) Accelerating Training of Transformer-Based Language Models with Progressive Layer Dropping. [arXiv:2010.13369](https://arxiv.org/abs/2010.13369) and [NeurIPS 2020](https://proceedings.neurips.cc/paper/2020/hash/a1140a3d0df1c81e24ae954d935e8926-Abstract.html).
391
+ 4. Jie Ren, Samyam Rajbhandari, Reza Yazdani Aminabadi, Olatunji Ruwase, Shuangyan Yang, Minjia Zhang, Dong Li, Yuxiong He. (2021) ZeRO-Offload: Democratizing Billion-Scale Model Training. [arXiv:2101.06840](https://arxiv.org/abs/2101.06840) and [USENIX ATC 2021](https://www.usenix.org/conference/atc21/presentation/ren-jie). [[paper]](https://arxiv.org/abs/2101.06840) [[slides]](https://www.usenix.org/system/files/atc21_slides_ren-jie.pdf) [[blog]](https://www.microsoft.com/en-us/research/blog/deepspeed-extreme-scale-model-training-for-everyone/)
392
+ 5. Hanlin Tang, Shaoduo Gan, Ammar Ahmad Awan, Samyam Rajbhandari, Conglong Li, Xiangru Lian, Ji Liu, Ce Zhang, Yuxiong He. (2021) 1-bit Adam: Communication Efficient Large-Scale Training with Adam's Convergence Speed. [arXiv:2102.02888](https://arxiv.org/abs/2102.02888) and [ICML 2021](http://proceedings.mlr.press/v139/tang21a.html).
393
+ 6. Samyam Rajbhandari, Olatunji Ruwase, Jeff Rasley, Shaden Smith, Yuxiong He. (2021) ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learning. [arXiv:2104.07857](https://arxiv.org/abs/2104.07857) and [SC 2021](https://dl.acm.org/doi/abs/10.1145/3458817.3476205). [[paper]](https://arxiv.org/abs/2104.07857) [[slides]](docs/assets/files/SC21-ZeRO-Infinity.pdf) [[blog]](https://www.microsoft.com/en-us/research/blog/zero-infinity-and-deepspeed-unlocking-unprecedented-model-scale-for-deep-learning-training/)
394
+ 7. Conglong Li, Ammar Ahmad Awan, Hanlin Tang, Samyam Rajbhandari, Yuxiong He. (2021) 1-bit LAMB: Communication Efficient Large-Scale Large-Batch Training with LAMB's Convergence Speed. [arXiv:2104.06069](https://arxiv.org/abs/2104.06069) and [HiPC 2022](https://hipc.org/advance-program/).
395
+ 8. Conglong Li, Minjia Zhang, Yuxiong He. (2021) The Stability-Efficiency Dilemma: Investigating Sequence Length Warmup for Training GPT Models. [arXiv:2108.06084](https://arxiv.org/abs/2108.06084) and [NeurIPS 2022](https://openreview.net/forum?id=JpZ5du_Kdh).
396
+ 9. Yucheng Lu, Conglong Li, Minjia Zhang, Christopher De Sa, Yuxiong He. (2022) Maximizing Communication Efficiency for Large-scale Training via 0/1 Adam. [arXiv:2202.06009](https://arxiv.org/abs/2202.06009).
397
+ 10. Samyam Rajbhandari, Conglong Li, Zhewei Yao, Minjia Zhang, Reza Yazdani Aminabadi, Ammar Ahmad Awan, Jeff Rasley, Yuxiong He. (2022) DeepSpeed-MoE: Advancing Mixture-of-Experts Inference and Training to Power Next-Generation AI Scale [arXiv:2201.05596](https://arxiv.org/abs/2201.05596) and [ICML 2022](https://proceedings.mlr.press/v162/rajbhandari22a.html). [[pdf]](https://arxiv.org/abs/2201.05596) [[slides]](docs/assets/files/ICML-5mins.pdf) [[blog]](https://www.microsoft.com/en-us/research/blog/deepspeed-advancing-moe-inference-and-training-to-power-next-generation-ai-scale/)
398
+ 11. Shaden Smith, Mostofa Patwary, Brandon Norick, Patrick LeGresley, Samyam Rajbhandari, Jared Casper, Zhun Liu, Shrimai Prabhumoye, George Zerveas, Vijay Korthikanti, Elton Zhang, Rewon Child, Reza Yazdani Aminabadi, Julie Bernauer, Xia Song, Mohammad Shoeybi, Yuxiong He, Michael Houston, Saurabh Tiwary, Bryan Catanzaro. (2022) Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B, A Large-Scale Generative Language Model [arXiv:2201.11990](https://arxiv.org/abs/2201.11990).
399
+ 12. Xiaoxia Wu, Zhewei Yao, Minjia Zhang, Conglong Li, Yuxiong He. (2022) Extreme Compression for Pre-trained Transformers Made Simple and Efficient. [arXiv:2206.01859](https://arxiv.org/abs/2206.01859) and [NeurIPS 2022](https://openreview.net/forum?id=xNeAhc2CNAl).
400
+ 13. Zhewei Yao, Reza Yazdani Aminabadi, Minjia Zhang, Xiaoxia Wu, Conglong Li, Yuxiong He. (2022) ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformers. [arXiv:2206.01861](https://arxiv.org/abs/2206.01861) and [NeurIPS 2022](https://openreview.net/forum?id=f-fVCElZ-G1) [[slides]](docs/assets/files/zeroquant_series.pdf) [[blog]](https://www.microsoft.com/en-us/research/blog/deepspeed-compression-a-composable-library-for-extreme-compression-and-zero-cost-quantization/)
401
+ 14. Reza Yazdani Aminabadi, Samyam Rajbhandari, Minjia Zhang, Ammar Ahmad Awan, Cheng Li, Du Li, Elton Zheng, Jeff Rasley, Shaden Smith, Olatunji Ruwase, Yuxiong He. (2022) DeepSpeed Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scale. [arXiv:2207.00032](https://arxiv.org/abs/2207.00032) and [SC 2022](https://dl.acm.org/doi/abs/10.5555/3571885.3571946). [[paper]](https://arxiv.org/abs/2207.00032) [[slides]](docs/assets/files/sc22-ds-inference.pdf) [[blog]](https://www.microsoft.com/en-us/research/blog/deepspeed-accelerating-large-scale-model-inference-and-training-via-system-optimizations-and-compression/)
402
+ 15. Zhewei Yao, Xiaoxia Wu, Conglong Li, Connor Holmes, Minjia Zhang, Cheng Li, Yuxiong He. (2022) Random-LTD: Random and Layerwise Token Dropping Brings Efficient Training for Large-scale Transformers. [arXiv:2211.11586](https://arxiv.org/abs/2211.11586).
403
+ 16. Conglong Li, Zhewei Yao, Xiaoxia Wu, Minjia Zhang, Yuxiong He. (2022) DeepSpeed Data Efficiency: Improving Deep Learning Model Quality and Training Efficiency via Efficient Data Sampling and Routing. [arXiv:2212.03597](https://arxiv.org/abs/2212.03597) [ENLSP2023 Workshop at NeurIPS2023](https://neurips2023-enlsp.github.io/)
404
+ 17. Xiaoxia Wu, Cheng Li, Reza Yazdani Aminabadi, Zhewei Yao, Yuxiong He. (2023) Understanding INT4 Quantization for Transformer Models: Latency Speedup, Composability, and Failure Cases. [arXiv:2301.12017](https://arxiv.org/abs/2301.12017) and [ICML2023](https://icml.cc/Conferences/2023).
405
+ 18. Syed Zawad, Cheng Li, Zhewei Yao, Elton Zheng, Yuxiong He, Feng Yan. (2023) DySR: Adaptive Super-Resolution via Algorithm and System Co-design. [ICLR:2023](https://openreview.net/forum?id=Pgtn4l6eKjv).
406
+ 19. Sheng Shen, Zhewei Yao, Chunyuan Li, Trevor Darrell, Kurt Keutzer, Yuxiong He. (2023) Scaling Vision-Language Models with Sparse Mixture of Experts. [arXiv:2303.07226](https://arxiv.org/abs/2303.07226) and [Finding at EMNLP2023](https://2023.emnlp.org/).
407
+ 20. Quentin Anthony, Ammar Ahmad Awan, Jeff Rasley, Yuxiong He, Aamir Shafi, Mustafa Abduljabbar, Hari Subramoni, Dhabaleswar Panda. (2023) MCR-DL: Mix-and-Match Communication Runtime for Deep Learning [arXiv:2303.08374](https://arxiv.org/abs/2303.08374) and will appear at IPDPS 2023.
408
+ 21. Siddharth Singh, Olatunji Ruwase, Ammar Ahmad Awan, Samyam Rajbhandari, Yuxiong He, Abhinav Bhatele. (2023) A Hybrid Tensor-Expert-Data Parallelism Approach to Optimize Mixture-of-Experts Training [arXiv:2303.06318](https://arxiv.org/abs/2303.06318) and [ICS 2023](https://dl.acm.org/doi/10.1145/3577193.3593704).
409
+ 22. Guanhua Wang, Heyang Qin, Sam Ade Jacobs, Xiaoxia Wu, Connor Holmes, Zhewei Yao, Samyam Rajbhandari, Olatunji Ruwase, Feng Yan, Lei Yang, Yuxiong He. (2023) ZeRO++: Extremely Efficient Collective Communication for Giant Model Training [arXiv:2306.10209](https://arxiv.org/abs/2306.10209) and [ML for Sys Workshop at NeurIPS2023](http://mlforsystems.org/) [[blog]](https://www.microsoft.com/en-us/research/blog/deepspeed-zero-a-leap-in-speed-for-llm-and-chat-model-training-with-4x-less-communication/)
410
+ 23. Zhewei Yao, Xiaoxia Wu, Cheng Li, Stephen Youn, Yuxiong He. (2023) ZeroQuant-V2: Exploring Post-training Quantization in LLMs from Comprehensive Study to Low Rank Compensation [arXiv:2303.08302](https://arxiv.org/abs/2303.08302) and [ENLSP2023 Workshop at NeurIPS2023](https://neurips2023-enlsp.github.io/) [[slides]](docs/assets/files/zeroquant_series.pdf)
411
+ 24. Pareesa Ameneh Golnari, Zhewei Yao, Yuxiong He. (2023) Selective Guidance: Are All the Denoising Steps of Guided Diffusion Important? [arXiv:2305.09847](https://arxiv.org/abs/2305.09847)
412
+ 25. Zhewei Yao, Reza Yazdani Aminabadi, Olatunji Ruwase, Samyam Rajbhandari, Xiaoxia Wu, Ammar Ahmad Awan, Jeff Rasley, Minjia Zhang, Conglong Li, Connor Holmes, Zhongzhu Zhou, Michael Wyatt, Molly Smith, Lev Kurilenko, Heyang Qin, Masahiro Tanaka, Shuai Che, Shuaiwen Leon Song, Yuxiong He. (2023) DeepSpeed-Chat: Easy, Fast and Affordable RLHF Training of ChatGPT-like Models at All Scales [arXiv:2308.01320](https://arxiv.org/abs/2308.01320).
413
+ 26. Xiaoxia Wu, Zhewei Yao, Yuxiong He. (2023) ZeroQuant-FP: A Leap Forward in LLMs Post-Training W4A8 Quantization Using Floating-Point Formats [arXiv:2307.09782](https://arxiv.org/abs/2307.09782) and [ENLSP2023 Workshop at NeurIPS2023](https://neurips2023-enlsp.github.io/) [[slides]](docs/assets/files/zeroquant_series.pdf)
414
+ 27. Zhewei Yao, Xiaoxia Wu, Conglong Li, Minjia Zhang, Heyang Qin, Olatunji Ruwase, Ammar Ahmad Awan, Samyam Rajbhandari, Yuxiong He. (2023) DeepSpeed-VisualChat: Multi-Round Multi-Image Interleave Chat via Multi-Modal Causal Attention [arXiv:2309.14327](https://arxiv.org/pdf/2309.14327.pdf)
415
+ 28. Shuaiwen Leon Song, Bonnie Kruft, Minjia Zhang, Conglong Li, Shiyang Chen, Chengming Zhang, Masahiro Tanaka, Xiaoxia Wu, Jeff Rasley, Ammar Ahmad Awan, Connor Holmes, Martin Cai, Adam Ghanem, Zhongzhu Zhou, Yuxiong He, et al. (2023) DeepSpeed4Science Initiative: Enabling Large-Scale Scientific Discovery through Sophisticated AI System Technologies [arXiv:2310.04610](https://arxiv.org/abs/2310.04610) [[blog]](https://www.microsoft.com/en-us/research/blog/announcing-the-deepspeed4science-initiative-enabling-large-scale-scientific-discovery-through-sophisticated-ai-system-technologies/)
416
+ 29. Zhewei Yao, Reza Yazdani Aminabadi, Stephen Youn, Xiaoxia Wu, Elton Zheng, Yuxiong He. (2023) ZeroQuant-HERO: Hardware-Enhanced Robust Optimized Post-Training Quantization Framework for W8A8 Transformers [arXiv:2310.17723](https://arxiv.org/abs/2310.17723)
417
+
418
+ 30. Xiaoxia Wu, Haojun Xia, Stephen Youn, Zhen Zheng, Shiyang Chen, Arash Bakhtiari, Michael Wyatt, Reza Yazdani Aminabadi, Yuxiong He, Olatunji Ruwase, Leon Song, Zhewei Yao (2023) ZeroQuant(4+2): Redefining LLMs Quantization with a New FP6-Centric Strategy for Diverse Generative Tasks [arXiv:2312.08583](https://arxiv.org/abs/2312.08583)
419
+
420
+ 31. Haojun Xia, Zhen Zheng, Xiaoxia Wu, Shiyang Chen, Zhewei Yao, Stephen Youn, Arash Bakhtiari, Michael Wyatt, Donglin Zhuang, Zhongzhu Zhou, Olatunji Ruwase, Yuxiong He, Shuaiwen Leon Song. (2024) FP6-LLM: Efficiently Serving Large Language Models Through FP6-Centric Algorithm-System Co-Design [arXiv:2401.14112](https://arxiv.org/abs/2401.14112)
421
+ 32. Sam Ade Jacobs, Masahiro Tanaka, Chengming Zhang, Minjia Zhang, Reza Yazdani Aminadabi, Shuaiwen Leon Song, Samyam Rajbhandari, Yuxiong He. (2024) [System Optimizations for Enabling Training of Extreme Long Sequence Transformer Models](https://dl.acm.org/doi/10.1145/3662158.3662806)
422
+ 33. Xinyu Lian, Sam Ade Jacobs, Lev Kurilenko, Masahiro Tanaka, Stas Bekman, Olatunji Ruwase, Minjia Zhang. (2024) Universal Checkpointing: Efficient and Flexible Checkpointing for Large Scale Distributed Training [arXiv:2406.18820](https://arxiv.org/abs/2406.18820)
423
+
424
+
425
+
426
+
427
+ # Videos
428
+ 1. DeepSpeed KDD 2020 Tutorial
429
+ 1. [Overview](https://www.youtube.com/watch?v=CaseqC45DNc&list=PLa85ZdUjfWS21mgibJ2vCvLziprjpKoW0&index=29)
430
+ 2. [ZeRO + large model training](https://www.youtube.com/watch?v=y4_bCiAsIAk&list=PLa85ZdUjfWS21mgibJ2vCvLziprjpKoW0&index=28)
431
+ 3. [17B T-NLG demo](https://www.youtube.com/watch?v=9V-ZbP92drg&list=PLa85ZdUjfWS21mgibJ2vCvLziprjpKoW0&index=27)
432
+ 4. [Fastest BERT training + RScan tuning](https://www.youtube.com/watch?v=o1K-ZG9F6u0&list=PLa85ZdUjfWS21mgibJ2vCvLziprjpKoW0&index=26)
433
+ 5. DeepSpeed hands on deep dive: [part 1](https://www.youtube.com/watch?v=_NOk-mBwDYg&list=PLa85ZdUjfWS21mgibJ2vCvLziprjpKoW0&index=92), [part 2](https://www.youtube.com/watch?v=sG6_c4VXLww&list=PLa85ZdUjfWS21mgibJ2vCvLziprjpKoW0&index=94), [part 3](https://www.youtube.com/watch?v=k9yPkBTayos&list=PLa85ZdUjfWS21mgibJ2vCvLziprjpKoW0&index=93)
434
+ 6. [FAQ](https://www.youtube.com/watch?v=nsHu6vEgPew&list=PLa85ZdUjfWS21mgibJ2vCvLziprjpKoW0&index=24)
435
+ 2. Microsoft Research Webinar
436
+ * Registration is free and all videos are available on-demand.
437
+ * [ZeRO & Fastest BERT: Increasing the scale and speed of deep learning training in DeepSpeed](https://note.microsoft.com/MSR-Webinar-DeepSpeed-Registration-On-Demand.html).
438
+ 3. [DeepSpeed on AzureML](https://youtu.be/yBVXR8G8Bg8)
439
+ 4. [Large Model Training and Inference with DeepSpeed // Samyam Rajbhandari // LLMs in Prod Conference](https://www.youtube.com/watch?v=cntxC3g22oU) [[slides]](docs/assets/files/presentation-mlops.pdf)
440
+ 5. Community Tutorials
441
+ * [DeepSpeed: All the tricks to scale to gigantic models (Mark Saroufim)](https://www.youtube.com/watch?v=pDGI668pNg0)
442
+ * [Turing-NLG, DeepSpeed and the ZeRO optimizer (Yannic Kilcher)](https://www.youtube.com/watch?v=tC01FRB0M7w)
443
+ * [Ultimate Guide To Scaling ML Models (The AI Epiphany)](https://www.youtube.com/watch?v=hc0u4avAkuM)
lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/RECORD ADDED
The diff for this file is too large to render. See raw diff
 
lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/REQUESTED ADDED
File without changes
lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/WHEEL ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/entry_points.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [pytest_randomly.random_seeder]
2
+ deepspeed = deepspeed.runtime.utils:set_random_seed
lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
lib/python3.12/site-packages/deepspeed-0.17.0.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ deepspeed
lib/python3.12/site-packages/deepspeed/nebula/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (250 Bytes). View file
 
lib/python3.12/site-packages/distutils-precedence.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2638ce9e2500e572a5e0de7faed6661eb569d1b696fcba07b0dd223da5f5d224
3
+ size 151
lib/python3.12/site-packages/filelock/__init__.py ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ A platform independent file lock that supports the with-statement.
3
+
4
+ .. autodata:: filelock.__version__
5
+ :no-value:
6
+
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import sys
12
+ import warnings
13
+ from typing import TYPE_CHECKING
14
+
15
+ from ._api import AcquireReturnProxy, BaseFileLock
16
+ from ._error import Timeout
17
+ from ._soft import SoftFileLock
18
+ from ._unix import UnixFileLock, has_fcntl
19
+ from ._windows import WindowsFileLock
20
+ from .asyncio import (
21
+ AsyncAcquireReturnProxy,
22
+ AsyncSoftFileLock,
23
+ AsyncUnixFileLock,
24
+ AsyncWindowsFileLock,
25
+ BaseAsyncFileLock,
26
+ )
27
+ from .version import version
28
+
29
+ #: version of the project as a string
30
+ __version__: str = version
31
+
32
+
33
+ if sys.platform == "win32": # pragma: win32 cover
34
+ _FileLock: type[BaseFileLock] = WindowsFileLock
35
+ _AsyncFileLock: type[BaseAsyncFileLock] = AsyncWindowsFileLock
36
+ else: # pragma: win32 no cover # noqa: PLR5501
37
+ if has_fcntl:
38
+ _FileLock: type[BaseFileLock] = UnixFileLock
39
+ _AsyncFileLock: type[BaseAsyncFileLock] = AsyncUnixFileLock
40
+ else:
41
+ _FileLock = SoftFileLock
42
+ _AsyncFileLock = AsyncSoftFileLock
43
+ if warnings is not None:
44
+ warnings.warn("only soft file lock is available", stacklevel=2)
45
+
46
+ if TYPE_CHECKING:
47
+ FileLock = SoftFileLock
48
+ AsyncFileLock = AsyncSoftFileLock
49
+ else:
50
+ #: Alias for the lock, which should be used for the current platform.
51
+ FileLock = _FileLock
52
+ AsyncFileLock = _AsyncFileLock
53
+
54
+
55
+ __all__ = [
56
+ "AcquireReturnProxy",
57
+ "AsyncAcquireReturnProxy",
58
+ "AsyncFileLock",
59
+ "AsyncSoftFileLock",
60
+ "AsyncUnixFileLock",
61
+ "AsyncWindowsFileLock",
62
+ "BaseAsyncFileLock",
63
+ "BaseFileLock",
64
+ "FileLock",
65
+ "SoftFileLock",
66
+ "Timeout",
67
+ "UnixFileLock",
68
+ "WindowsFileLock",
69
+ "__version__",
70
+ ]
lib/python3.12/site-packages/filelock/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (1.57 kB). View file
 
lib/python3.12/site-packages/filelock/__pycache__/_api.cpython-312.pyc ADDED
Binary file (16.6 kB). View file
 
lib/python3.12/site-packages/filelock/__pycache__/_error.cpython-312.pyc ADDED
Binary file (1.76 kB). View file
 
lib/python3.12/site-packages/filelock/__pycache__/_soft.cpython-312.pyc ADDED
Binary file (2.46 kB). View file
 
lib/python3.12/site-packages/filelock/__pycache__/_unix.cpython-312.pyc ADDED
Binary file (3.55 kB). View file
 
lib/python3.12/site-packages/filelock/__pycache__/_util.cpython-312.pyc ADDED
Binary file (2.01 kB). View file
 
lib/python3.12/site-packages/filelock/__pycache__/_windows.cpython-312.pyc ADDED
Binary file (3.26 kB). View file
 
lib/python3.12/site-packages/filelock/__pycache__/asyncio.cpython-312.pyc ADDED
Binary file (15.6 kB). View file
 
lib/python3.12/site-packages/filelock/__pycache__/version.cpython-312.pyc ADDED
Binary file (648 Bytes). View file
 
lib/python3.12/site-packages/filelock/_api.py ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import contextlib
4
+ import inspect
5
+ import logging
6
+ import os
7
+ import time
8
+ import warnings
9
+ from abc import ABCMeta, abstractmethod
10
+ from dataclasses import dataclass
11
+ from threading import local
12
+ from typing import TYPE_CHECKING, Any, cast
13
+ from weakref import WeakValueDictionary
14
+
15
+ from ._error import Timeout
16
+
17
+ if TYPE_CHECKING:
18
+ import sys
19
+ from types import TracebackType
20
+
21
+ if sys.version_info >= (3, 11): # pragma: no cover (py311+)
22
+ from typing import Self
23
+ else: # pragma: no cover (<py311)
24
+ from typing_extensions import Self
25
+
26
+
27
+ _LOGGER = logging.getLogger("filelock")
28
+
29
+
30
+ # This is a helper class which is returned by :meth:`BaseFileLock.acquire` and wraps the lock to make sure __enter__
31
+ # is not called twice when entering the with statement. If we would simply return *self*, the lock would be acquired
32
+ # again in the *__enter__* method of the BaseFileLock, but not released again automatically. issue #37 (memory leak)
33
+ class AcquireReturnProxy:
34
+ """A context-aware object that will release the lock file when exiting."""
35
+
36
+ def __init__(self, lock: BaseFileLock) -> None:
37
+ self.lock = lock
38
+
39
+ def __enter__(self) -> BaseFileLock:
40
+ return self.lock
41
+
42
+ def __exit__(
43
+ self,
44
+ exc_type: type[BaseException] | None,
45
+ exc_value: BaseException | None,
46
+ traceback: TracebackType | None,
47
+ ) -> None:
48
+ self.lock.release()
49
+
50
+
51
+ @dataclass
52
+ class FileLockContext:
53
+ """A dataclass which holds the context for a ``BaseFileLock`` object."""
54
+
55
+ # The context is held in a separate class to allow optional use of thread local storage via the
56
+ # ThreadLocalFileContext class.
57
+
58
+ #: The path to the lock file.
59
+ lock_file: str
60
+
61
+ #: The default timeout value.
62
+ timeout: float
63
+
64
+ #: The mode for the lock files
65
+ mode: int
66
+
67
+ #: Whether the lock should be blocking or not
68
+ blocking: bool
69
+
70
+ #: The file descriptor for the *_lock_file* as it is returned by the os.open() function, not None when lock held
71
+ lock_file_fd: int | None = None
72
+
73
+ #: The lock counter is used for implementing the nested locking mechanism.
74
+ lock_counter: int = 0 # When the lock is acquired is increased and the lock is only released, when this value is 0
75
+
76
+
77
+ class ThreadLocalFileContext(FileLockContext, local):
78
+ """A thread local version of the ``FileLockContext`` class."""
79
+
80
+
81
+ class FileLockMeta(ABCMeta):
82
+ def __call__( # noqa: PLR0913
83
+ cls,
84
+ lock_file: str | os.PathLike[str],
85
+ timeout: float = -1,
86
+ mode: int = 0o644,
87
+ thread_local: bool = True, # noqa: FBT001, FBT002
88
+ *,
89
+ blocking: bool = True,
90
+ is_singleton: bool = False,
91
+ **kwargs: Any, # capture remaining kwargs for subclasses # noqa: ANN401
92
+ ) -> BaseFileLock:
93
+ if is_singleton:
94
+ instance = cls._instances.get(str(lock_file)) # type: ignore[attr-defined]
95
+ if instance:
96
+ params_to_check = {
97
+ "thread_local": (thread_local, instance.is_thread_local()),
98
+ "timeout": (timeout, instance.timeout),
99
+ "mode": (mode, instance.mode),
100
+ "blocking": (blocking, instance.blocking),
101
+ }
102
+
103
+ non_matching_params = {
104
+ name: (passed_param, set_param)
105
+ for name, (passed_param, set_param) in params_to_check.items()
106
+ if passed_param != set_param
107
+ }
108
+ if not non_matching_params:
109
+ return cast("BaseFileLock", instance)
110
+
111
+ # parameters do not match; raise error
112
+ msg = "Singleton lock instances cannot be initialized with differing arguments"
113
+ msg += "\nNon-matching arguments: "
114
+ for param_name, (passed_param, set_param) in non_matching_params.items():
115
+ msg += f"\n\t{param_name} (existing lock has {set_param} but {passed_param} was passed)"
116
+ raise ValueError(msg)
117
+
118
+ # Workaround to make `__init__`'s params optional in subclasses
119
+ # E.g. virtualenv changes the signature of the `__init__` method in the `BaseFileLock` class descendant
120
+ # (https://github.com/tox-dev/filelock/pull/340)
121
+
122
+ all_params = {
123
+ "timeout": timeout,
124
+ "mode": mode,
125
+ "thread_local": thread_local,
126
+ "blocking": blocking,
127
+ "is_singleton": is_singleton,
128
+ **kwargs,
129
+ }
130
+
131
+ present_params = inspect.signature(cls.__init__).parameters # type: ignore[misc]
132
+ init_params = {key: value for key, value in all_params.items() if key in present_params}
133
+
134
+ instance = super().__call__(lock_file, **init_params)
135
+
136
+ if is_singleton:
137
+ cls._instances[str(lock_file)] = instance # type: ignore[attr-defined]
138
+
139
+ return cast("BaseFileLock", instance)
140
+
141
+
142
+ class BaseFileLock(contextlib.ContextDecorator, metaclass=FileLockMeta):
143
+ """Abstract base class for a file lock object."""
144
+
145
+ _instances: WeakValueDictionary[str, BaseFileLock]
146
+
147
+ def __init_subclass__(cls, **kwargs: dict[str, Any]) -> None:
148
+ """Setup unique state for lock subclasses."""
149
+ super().__init_subclass__(**kwargs)
150
+ cls._instances = WeakValueDictionary()
151
+
152
+ def __init__( # noqa: PLR0913
153
+ self,
154
+ lock_file: str | os.PathLike[str],
155
+ timeout: float = -1,
156
+ mode: int = 0o644,
157
+ thread_local: bool = True, # noqa: FBT001, FBT002
158
+ *,
159
+ blocking: bool = True,
160
+ is_singleton: bool = False,
161
+ ) -> None:
162
+ """
163
+ Create a new lock object.
164
+
165
+ :param lock_file: path to the file
166
+ :param timeout: default timeout when acquiring the lock, in seconds. It will be used as fallback value in \
167
+ the acquire method, if no timeout value (``None``) is given. If you want to disable the timeout, set it \
168
+ to a negative value. A timeout of 0 means that there is exactly one attempt to acquire the file lock.
169
+ :param mode: file permissions for the lockfile
170
+ :param thread_local: Whether this object's internal context should be thread local or not. If this is set to \
171
+ ``False`` then the lock will be reentrant across threads.
172
+ :param blocking: whether the lock should be blocking or not
173
+ :param is_singleton: If this is set to ``True`` then only one instance of this class will be created \
174
+ per lock file. This is useful if you want to use the lock object for reentrant locking without needing \
175
+ to pass the same object around.
176
+
177
+ """
178
+ self._is_thread_local = thread_local
179
+ self._is_singleton = is_singleton
180
+
181
+ # Create the context. Note that external code should not work with the context directly and should instead use
182
+ # properties of this class.
183
+ kwargs: dict[str, Any] = {
184
+ "lock_file": os.fspath(lock_file),
185
+ "timeout": timeout,
186
+ "mode": mode,
187
+ "blocking": blocking,
188
+ }
189
+ self._context: FileLockContext = (ThreadLocalFileContext if thread_local else FileLockContext)(**kwargs)
190
+
191
+ def is_thread_local(self) -> bool:
192
+ """:return: a flag indicating if this lock is thread local or not"""
193
+ return self._is_thread_local
194
+
195
+ @property
196
+ def is_singleton(self) -> bool:
197
+ """:return: a flag indicating if this lock is singleton or not"""
198
+ return self._is_singleton
199
+
200
+ @property
201
+ def lock_file(self) -> str:
202
+ """:return: path to the lock file"""
203
+ return self._context.lock_file
204
+
205
+ @property
206
+ def timeout(self) -> float:
207
+ """
208
+ :return: the default timeout value, in seconds
209
+
210
+ .. versionadded:: 2.0.0
211
+ """
212
+ return self._context.timeout
213
+
214
+ @timeout.setter
215
+ def timeout(self, value: float | str) -> None:
216
+ """
217
+ Change the default timeout value.
218
+
219
+ :param value: the new value, in seconds
220
+
221
+ """
222
+ self._context.timeout = float(value)
223
+
224
+ @property
225
+ def blocking(self) -> bool:
226
+ """:return: whether the locking is blocking or not"""
227
+ return self._context.blocking
228
+
229
+ @blocking.setter
230
+ def blocking(self, value: bool) -> None:
231
+ """
232
+ Change the default blocking value.
233
+
234
+ :param value: the new value as bool
235
+
236
+ """
237
+ self._context.blocking = value
238
+
239
+ @property
240
+ def mode(self) -> int:
241
+ """:return: the file permissions for the lockfile"""
242
+ return self._context.mode
243
+
244
+ @abstractmethod
245
+ def _acquire(self) -> None:
246
+ """If the file lock could be acquired, self._context.lock_file_fd holds the file descriptor of the lock file."""
247
+ raise NotImplementedError
248
+
249
+ @abstractmethod
250
+ def _release(self) -> None:
251
+ """Releases the lock and sets self._context.lock_file_fd to None."""
252
+ raise NotImplementedError
253
+
254
+ @property
255
+ def is_locked(self) -> bool:
256
+ """
257
+
258
+ :return: A boolean indicating if the lock file is holding the lock currently.
259
+
260
+ .. versionchanged:: 2.0.0
261
+
262
+ This was previously a method and is now a property.
263
+ """
264
+ return self._context.lock_file_fd is not None
265
+
266
+ @property
267
+ def lock_counter(self) -> int:
268
+ """:return: The number of times this lock has been acquired (but not yet released)."""
269
+ return self._context.lock_counter
270
+
271
+ def acquire(
272
+ self,
273
+ timeout: float | None = None,
274
+ poll_interval: float = 0.05,
275
+ *,
276
+ poll_intervall: float | None = None,
277
+ blocking: bool | None = None,
278
+ ) -> AcquireReturnProxy:
279
+ """
280
+ Try to acquire the file lock.
281
+
282
+ :param timeout: maximum wait time for acquiring the lock, ``None`` means use the default :attr:`~timeout` is and
283
+ if ``timeout < 0``, there is no timeout and this method will block until the lock could be acquired
284
+ :param poll_interval: interval of trying to acquire the lock file
285
+ :param poll_intervall: deprecated, kept for backwards compatibility, use ``poll_interval`` instead
286
+ :param blocking: defaults to True. If False, function will return immediately if it cannot obtain a lock on the
287
+ first attempt. Otherwise, this method will block until the timeout expires or the lock is acquired.
288
+ :raises Timeout: if fails to acquire lock within the timeout period
289
+ :return: a context object that will unlock the file when the context is exited
290
+
291
+ .. code-block:: python
292
+
293
+ # You can use this method in the context manager (recommended)
294
+ with lock.acquire():
295
+ pass
296
+
297
+ # Or use an equivalent try-finally construct:
298
+ lock.acquire()
299
+ try:
300
+ pass
301
+ finally:
302
+ lock.release()
303
+
304
+ .. versionchanged:: 2.0.0
305
+
306
+ This method returns now a *proxy* object instead of *self*,
307
+ so that it can be used in a with statement without side effects.
308
+
309
+ """
310
+ # Use the default timeout, if no timeout is provided.
311
+ if timeout is None:
312
+ timeout = self._context.timeout
313
+
314
+ if blocking is None:
315
+ blocking = self._context.blocking
316
+
317
+ if poll_intervall is not None:
318
+ msg = "use poll_interval instead of poll_intervall"
319
+ warnings.warn(msg, DeprecationWarning, stacklevel=2)
320
+ poll_interval = poll_intervall
321
+
322
+ # Increment the number right at the beginning. We can still undo it, if something fails.
323
+ self._context.lock_counter += 1
324
+
325
+ lock_id = id(self)
326
+ lock_filename = self.lock_file
327
+ start_time = time.perf_counter()
328
+ try:
329
+ while True:
330
+ if not self.is_locked:
331
+ _LOGGER.debug("Attempting to acquire lock %s on %s", lock_id, lock_filename)
332
+ self._acquire()
333
+ if self.is_locked:
334
+ _LOGGER.debug("Lock %s acquired on %s", lock_id, lock_filename)
335
+ break
336
+ if blocking is False:
337
+ _LOGGER.debug("Failed to immediately acquire lock %s on %s", lock_id, lock_filename)
338
+ raise Timeout(lock_filename) # noqa: TRY301
339
+ if 0 <= timeout < time.perf_counter() - start_time:
340
+ _LOGGER.debug("Timeout on acquiring lock %s on %s", lock_id, lock_filename)
341
+ raise Timeout(lock_filename) # noqa: TRY301
342
+ msg = "Lock %s not acquired on %s, waiting %s seconds ..."
343
+ _LOGGER.debug(msg, lock_id, lock_filename, poll_interval)
344
+ time.sleep(poll_interval)
345
+ except BaseException: # Something did go wrong, so decrement the counter.
346
+ self._context.lock_counter = max(0, self._context.lock_counter - 1)
347
+ raise
348
+ return AcquireReturnProxy(lock=self)
349
+
350
+ def release(self, force: bool = False) -> None: # noqa: FBT001, FBT002
351
+ """
352
+ Releases the file lock. Please note, that the lock is only completely released, if the lock counter is 0.
353
+ Also note, that the lock file itself is not automatically deleted.
354
+
355
+ :param force: If true, the lock counter is ignored and the lock is released in every case/
356
+
357
+ """
358
+ if self.is_locked:
359
+ self._context.lock_counter -= 1
360
+
361
+ if self._context.lock_counter == 0 or force:
362
+ lock_id, lock_filename = id(self), self.lock_file
363
+
364
+ _LOGGER.debug("Attempting to release lock %s on %s", lock_id, lock_filename)
365
+ self._release()
366
+ self._context.lock_counter = 0
367
+ _LOGGER.debug("Lock %s released on %s", lock_id, lock_filename)
368
+
369
+ def __enter__(self) -> Self:
370
+ """
371
+ Acquire the lock.
372
+
373
+ :return: the lock object
374
+
375
+ """
376
+ self.acquire()
377
+ return self
378
+
379
+ def __exit__(
380
+ self,
381
+ exc_type: type[BaseException] | None,
382
+ exc_value: BaseException | None,
383
+ traceback: TracebackType | None,
384
+ ) -> None:
385
+ """
386
+ Release the lock.
387
+
388
+ :param exc_type: the exception type if raised
389
+ :param exc_value: the exception value if raised
390
+ :param traceback: the exception traceback if raised
391
+
392
+ """
393
+ self.release()
394
+
395
+ def __del__(self) -> None:
396
+ """Called when the lock object is deleted."""
397
+ self.release(force=True)
398
+
399
+
400
+ __all__ = [
401
+ "AcquireReturnProxy",
402
+ "BaseFileLock",
403
+ ]
lib/python3.12/site-packages/filelock/_error.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+
6
+ class Timeout(TimeoutError): # noqa: N818
7
+ """Raised when the lock could not be acquired in *timeout* seconds."""
8
+
9
+ def __init__(self, lock_file: str) -> None:
10
+ super().__init__()
11
+ self._lock_file = lock_file
12
+
13
+ def __reduce__(self) -> str | tuple[Any, ...]:
14
+ return self.__class__, (self._lock_file,) # Properly pickle the exception
15
+
16
+ def __str__(self) -> str:
17
+ return f"The file lock '{self._lock_file}' could not be acquired."
18
+
19
+ def __repr__(self) -> str:
20
+ return f"{self.__class__.__name__}({self.lock_file!r})"
21
+
22
+ @property
23
+ def lock_file(self) -> str:
24
+ """:return: The path of the file lock."""
25
+ return self._lock_file
26
+
27
+
28
+ __all__ = [
29
+ "Timeout",
30
+ ]
lib/python3.12/site-packages/filelock/_soft.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import sys
5
+ from contextlib import suppress
6
+ from errno import EACCES, EEXIST
7
+ from pathlib import Path
8
+
9
+ from ._api import BaseFileLock
10
+ from ._util import ensure_directory_exists, raise_on_not_writable_file
11
+
12
+
13
+ class SoftFileLock(BaseFileLock):
14
+ """Simply watches the existence of the lock file."""
15
+
16
+ def _acquire(self) -> None:
17
+ raise_on_not_writable_file(self.lock_file)
18
+ ensure_directory_exists(self.lock_file)
19
+ # first check for exists and read-only mode as the open will mask this case as EEXIST
20
+ flags = (
21
+ os.O_WRONLY # open for writing only
22
+ | os.O_CREAT
23
+ | os.O_EXCL # together with above raise EEXIST if the file specified by filename exists
24
+ | os.O_TRUNC # truncate the file to zero byte
25
+ )
26
+ try:
27
+ file_handler = os.open(self.lock_file, flags, self._context.mode)
28
+ except OSError as exception: # re-raise unless expected exception
29
+ if not (
30
+ exception.errno == EEXIST # lock already exist
31
+ or (exception.errno == EACCES and sys.platform == "win32") # has no access to this lock
32
+ ): # pragma: win32 no cover
33
+ raise
34
+ else:
35
+ self._context.lock_file_fd = file_handler
36
+
37
+ def _release(self) -> None:
38
+ assert self._context.lock_file_fd is not None # noqa: S101
39
+ os.close(self._context.lock_file_fd) # the lock file is definitely not None
40
+ self._context.lock_file_fd = None
41
+ with suppress(OSError): # the file is already deleted and that's what we want
42
+ Path(self.lock_file).unlink()
43
+
44
+
45
+ __all__ = [
46
+ "SoftFileLock",
47
+ ]
lib/python3.12/site-packages/filelock/_unix.py ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import sys
5
+ from contextlib import suppress
6
+ from errno import ENOSYS
7
+ from pathlib import Path
8
+ from typing import cast
9
+
10
+ from ._api import BaseFileLock
11
+ from ._util import ensure_directory_exists
12
+
13
+ #: a flag to indicate if the fcntl API is available
14
+ has_fcntl = False
15
+ if sys.platform == "win32": # pragma: win32 cover
16
+
17
+ class UnixFileLock(BaseFileLock):
18
+ """Uses the :func:`fcntl.flock` to hard lock the lock file on unix systems."""
19
+
20
+ def _acquire(self) -> None:
21
+ raise NotImplementedError
22
+
23
+ def _release(self) -> None:
24
+ raise NotImplementedError
25
+
26
+ else: # pragma: win32 no cover
27
+ try:
28
+ import fcntl
29
+
30
+ _ = (fcntl.flock, fcntl.LOCK_EX, fcntl.LOCK_NB, fcntl.LOCK_UN)
31
+ except (ImportError, AttributeError):
32
+ pass
33
+ else:
34
+ has_fcntl = True
35
+
36
+ class UnixFileLock(BaseFileLock):
37
+ """Uses the :func:`fcntl.flock` to hard lock the lock file on unix systems."""
38
+
39
+ def _acquire(self) -> None:
40
+ ensure_directory_exists(self.lock_file)
41
+ open_flags = os.O_RDWR | os.O_TRUNC
42
+ if not Path(self.lock_file).exists():
43
+ open_flags |= os.O_CREAT
44
+ fd = os.open(self.lock_file, open_flags, self._context.mode)
45
+ with suppress(PermissionError): # This locked is not owned by this UID
46
+ os.fchmod(fd, self._context.mode)
47
+ try:
48
+ fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
49
+ except OSError as exception:
50
+ os.close(fd)
51
+ if exception.errno == ENOSYS: # NotImplemented error
52
+ msg = "FileSystem does not appear to support flock; use SoftFileLock instead"
53
+ raise NotImplementedError(msg) from exception
54
+ else:
55
+ self._context.lock_file_fd = fd
56
+
57
+ def _release(self) -> None:
58
+ # Do not remove the lockfile:
59
+ # https://github.com/tox-dev/py-filelock/issues/31
60
+ # https://stackoverflow.com/questions/17708885/flock-removing-locked-file-without-race-condition
61
+ fd = cast("int", self._context.lock_file_fd)
62
+ self._context.lock_file_fd = None
63
+ fcntl.flock(fd, fcntl.LOCK_UN)
64
+ os.close(fd)
65
+
66
+
67
+ __all__ = [
68
+ "UnixFileLock",
69
+ "has_fcntl",
70
+ ]
lib/python3.12/site-packages/filelock/_util.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import stat
5
+ import sys
6
+ from errno import EACCES, EISDIR
7
+ from pathlib import Path
8
+
9
+
10
+ def raise_on_not_writable_file(filename: str) -> None:
11
+ """
12
+ Raise an exception if attempting to open the file for writing would fail.
13
+
14
+ This is done so files that will never be writable can be separated from files that are writable but currently
15
+ locked.
16
+
17
+ :param filename: file to check
18
+ :raises OSError: as if the file was opened for writing.
19
+
20
+ """
21
+ try: # use stat to do exists + can write to check without race condition
22
+ file_stat = os.stat(filename) # noqa: PTH116
23
+ except OSError:
24
+ return # swallow does not exist or other errors
25
+
26
+ if file_stat.st_mtime != 0: # if os.stat returns but modification is zero that's an invalid os.stat - ignore it
27
+ if not (file_stat.st_mode & stat.S_IWUSR):
28
+ raise PermissionError(EACCES, "Permission denied", filename)
29
+
30
+ if stat.S_ISDIR(file_stat.st_mode):
31
+ if sys.platform == "win32": # pragma: win32 cover
32
+ # On Windows, this is PermissionError
33
+ raise PermissionError(EACCES, "Permission denied", filename)
34
+ else: # pragma: win32 no cover # noqa: RET506
35
+ # On linux / macOS, this is IsADirectoryError
36
+ raise IsADirectoryError(EISDIR, "Is a directory", filename)
37
+
38
+
39
+ def ensure_directory_exists(filename: Path | str) -> None:
40
+ """
41
+ Ensure the directory containing the file exists (create it if necessary).
42
+
43
+ :param filename: file.
44
+
45
+ """
46
+ Path(filename).parent.mkdir(parents=True, exist_ok=True)
47
+
48
+
49
+ __all__ = [
50
+ "ensure_directory_exists",
51
+ "raise_on_not_writable_file",
52
+ ]
lib/python3.12/site-packages/filelock/_windows.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import sys
5
+ from contextlib import suppress
6
+ from errno import EACCES
7
+ from pathlib import Path
8
+ from typing import cast
9
+
10
+ from ._api import BaseFileLock
11
+ from ._util import ensure_directory_exists, raise_on_not_writable_file
12
+
13
+ if sys.platform == "win32": # pragma: win32 cover
14
+ import msvcrt
15
+
16
+ class WindowsFileLock(BaseFileLock):
17
+ """Uses the :func:`msvcrt.locking` function to hard lock the lock file on Windows systems."""
18
+
19
+ def _acquire(self) -> None:
20
+ raise_on_not_writable_file(self.lock_file)
21
+ ensure_directory_exists(self.lock_file)
22
+ flags = (
23
+ os.O_RDWR # open for read and write
24
+ | os.O_CREAT # create file if not exists
25
+ | os.O_TRUNC # truncate file if not empty
26
+ )
27
+ try:
28
+ fd = os.open(self.lock_file, flags, self._context.mode)
29
+ except OSError as exception:
30
+ if exception.errno != EACCES: # has no access to this lock
31
+ raise
32
+ else:
33
+ try:
34
+ msvcrt.locking(fd, msvcrt.LK_NBLCK, 1)
35
+ except OSError as exception:
36
+ os.close(fd) # close file first
37
+ if exception.errno != EACCES: # file is already locked
38
+ raise
39
+ else:
40
+ self._context.lock_file_fd = fd
41
+
42
+ def _release(self) -> None:
43
+ fd = cast("int", self._context.lock_file_fd)
44
+ self._context.lock_file_fd = None
45
+ msvcrt.locking(fd, msvcrt.LK_UNLCK, 1)
46
+ os.close(fd)
47
+
48
+ with suppress(OSError): # Probably another instance of the application hat acquired the file lock.
49
+ Path(self.lock_file).unlink()
50
+
51
+ else: # pragma: win32 no cover
52
+
53
+ class WindowsFileLock(BaseFileLock):
54
+ """Uses the :func:`msvcrt.locking` function to hard lock the lock file on Windows systems."""
55
+
56
+ def _acquire(self) -> None:
57
+ raise NotImplementedError
58
+
59
+ def _release(self) -> None:
60
+ raise NotImplementedError
61
+
62
+
63
+ __all__ = [
64
+ "WindowsFileLock",
65
+ ]
lib/python3.12/site-packages/filelock/asyncio.py ADDED
@@ -0,0 +1,342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """An asyncio-based implementation of the file lock."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import asyncio
6
+ import contextlib
7
+ import logging
8
+ import os
9
+ import time
10
+ from dataclasses import dataclass
11
+ from threading import local
12
+ from typing import TYPE_CHECKING, Any, Callable, NoReturn, cast
13
+
14
+ from ._api import BaseFileLock, FileLockContext, FileLockMeta
15
+ from ._error import Timeout
16
+ from ._soft import SoftFileLock
17
+ from ._unix import UnixFileLock
18
+ from ._windows import WindowsFileLock
19
+
20
+ if TYPE_CHECKING:
21
+ import sys
22
+ from concurrent import futures
23
+ from types import TracebackType
24
+
25
+ if sys.version_info >= (3, 11): # pragma: no cover (py311+)
26
+ from typing import Self
27
+ else: # pragma: no cover (<py311)
28
+ from typing_extensions import Self
29
+
30
+
31
+ _LOGGER = logging.getLogger("filelock")
32
+
33
+
34
+ @dataclass
35
+ class AsyncFileLockContext(FileLockContext):
36
+ """A dataclass which holds the context for a ``BaseAsyncFileLock`` object."""
37
+
38
+ #: Whether run in executor
39
+ run_in_executor: bool = True
40
+
41
+ #: The executor
42
+ executor: futures.Executor | None = None
43
+
44
+ #: The loop
45
+ loop: asyncio.AbstractEventLoop | None = None
46
+
47
+
48
+ class AsyncThreadLocalFileContext(AsyncFileLockContext, local):
49
+ """A thread local version of the ``FileLockContext`` class."""
50
+
51
+
52
+ class AsyncAcquireReturnProxy:
53
+ """A context-aware object that will release the lock file when exiting."""
54
+
55
+ def __init__(self, lock: BaseAsyncFileLock) -> None: # noqa: D107
56
+ self.lock = lock
57
+
58
+ async def __aenter__(self) -> BaseAsyncFileLock: # noqa: D105
59
+ return self.lock
60
+
61
+ async def __aexit__( # noqa: D105
62
+ self,
63
+ exc_type: type[BaseException] | None,
64
+ exc_value: BaseException | None,
65
+ traceback: TracebackType | None,
66
+ ) -> None:
67
+ await self.lock.release()
68
+
69
+
70
+ class AsyncFileLockMeta(FileLockMeta):
71
+ def __call__( # type: ignore[override] # noqa: PLR0913
72
+ cls, # noqa: N805
73
+ lock_file: str | os.PathLike[str],
74
+ timeout: float = -1,
75
+ mode: int = 0o644,
76
+ thread_local: bool = False, # noqa: FBT001, FBT002
77
+ *,
78
+ blocking: bool = True,
79
+ is_singleton: bool = False,
80
+ loop: asyncio.AbstractEventLoop | None = None,
81
+ run_in_executor: bool = True,
82
+ executor: futures.Executor | None = None,
83
+ ) -> BaseAsyncFileLock:
84
+ if thread_local and run_in_executor:
85
+ msg = "run_in_executor is not supported when thread_local is True"
86
+ raise ValueError(msg)
87
+ instance = super().__call__(
88
+ lock_file=lock_file,
89
+ timeout=timeout,
90
+ mode=mode,
91
+ thread_local=thread_local,
92
+ blocking=blocking,
93
+ is_singleton=is_singleton,
94
+ loop=loop,
95
+ run_in_executor=run_in_executor,
96
+ executor=executor,
97
+ )
98
+ return cast("BaseAsyncFileLock", instance)
99
+
100
+
101
+ class BaseAsyncFileLock(BaseFileLock, metaclass=AsyncFileLockMeta):
102
+ """Base class for asynchronous file locks."""
103
+
104
+ def __init__( # noqa: PLR0913
105
+ self,
106
+ lock_file: str | os.PathLike[str],
107
+ timeout: float = -1,
108
+ mode: int = 0o644,
109
+ thread_local: bool = False, # noqa: FBT001, FBT002
110
+ *,
111
+ blocking: bool = True,
112
+ is_singleton: bool = False,
113
+ loop: asyncio.AbstractEventLoop | None = None,
114
+ run_in_executor: bool = True,
115
+ executor: futures.Executor | None = None,
116
+ ) -> None:
117
+ """
118
+ Create a new lock object.
119
+
120
+ :param lock_file: path to the file
121
+ :param timeout: default timeout when acquiring the lock, in seconds. It will be used as fallback value in \
122
+ the acquire method, if no timeout value (``None``) is given. If you want to disable the timeout, set it \
123
+ to a negative value. A timeout of 0 means that there is exactly one attempt to acquire the file lock.
124
+ :param mode: file permissions for the lockfile
125
+ :param thread_local: Whether this object's internal context should be thread local or not. If this is set to \
126
+ ``False`` then the lock will be reentrant across threads.
127
+ :param blocking: whether the lock should be blocking or not
128
+ :param is_singleton: If this is set to ``True`` then only one instance of this class will be created \
129
+ per lock file. This is useful if you want to use the lock object for reentrant locking without needing \
130
+ to pass the same object around.
131
+ :param loop: The event loop to use. If not specified, the running event loop will be used.
132
+ :param run_in_executor: If this is set to ``True`` then the lock will be acquired in an executor.
133
+ :param executor: The executor to use. If not specified, the default executor will be used.
134
+
135
+ """
136
+ self._is_thread_local = thread_local
137
+ self._is_singleton = is_singleton
138
+
139
+ # Create the context. Note that external code should not work with the context directly and should instead use
140
+ # properties of this class.
141
+ kwargs: dict[str, Any] = {
142
+ "lock_file": os.fspath(lock_file),
143
+ "timeout": timeout,
144
+ "mode": mode,
145
+ "blocking": blocking,
146
+ "loop": loop,
147
+ "run_in_executor": run_in_executor,
148
+ "executor": executor,
149
+ }
150
+ self._context: AsyncFileLockContext = (AsyncThreadLocalFileContext if thread_local else AsyncFileLockContext)(
151
+ **kwargs
152
+ )
153
+
154
+ @property
155
+ def run_in_executor(self) -> bool:
156
+ """::return: whether run in executor."""
157
+ return self._context.run_in_executor
158
+
159
+ @property
160
+ def executor(self) -> futures.Executor | None:
161
+ """::return: the executor."""
162
+ return self._context.executor
163
+
164
+ @executor.setter
165
+ def executor(self, value: futures.Executor | None) -> None: # pragma: no cover
166
+ """
167
+ Change the executor.
168
+
169
+ :param value: the new executor or ``None``
170
+ :type value: futures.Executor | None
171
+
172
+ """
173
+ self._context.executor = value
174
+
175
+ @property
176
+ def loop(self) -> asyncio.AbstractEventLoop | None:
177
+ """::return: the event loop."""
178
+ return self._context.loop
179
+
180
+ async def acquire( # type: ignore[override]
181
+ self,
182
+ timeout: float | None = None,
183
+ poll_interval: float = 0.05,
184
+ *,
185
+ blocking: bool | None = None,
186
+ ) -> AsyncAcquireReturnProxy:
187
+ """
188
+ Try to acquire the file lock.
189
+
190
+ :param timeout: maximum wait time for acquiring the lock, ``None`` means use the default
191
+ :attr:`~BaseFileLock.timeout` is and if ``timeout < 0``, there is no timeout and
192
+ this method will block until the lock could be acquired
193
+ :param poll_interval: interval of trying to acquire the lock file
194
+ :param blocking: defaults to True. If False, function will return immediately if it cannot obtain a lock on the
195
+ first attempt. Otherwise, this method will block until the timeout expires or the lock is acquired.
196
+ :raises Timeout: if fails to acquire lock within the timeout period
197
+ :return: a context object that will unlock the file when the context is exited
198
+
199
+ .. code-block:: python
200
+
201
+ # You can use this method in the context manager (recommended)
202
+ with lock.acquire():
203
+ pass
204
+
205
+ # Or use an equivalent try-finally construct:
206
+ lock.acquire()
207
+ try:
208
+ pass
209
+ finally:
210
+ lock.release()
211
+
212
+ """
213
+ # Use the default timeout, if no timeout is provided.
214
+ if timeout is None:
215
+ timeout = self._context.timeout
216
+
217
+ if blocking is None:
218
+ blocking = self._context.blocking
219
+
220
+ # Increment the number right at the beginning. We can still undo it, if something fails.
221
+ self._context.lock_counter += 1
222
+
223
+ lock_id = id(self)
224
+ lock_filename = self.lock_file
225
+ start_time = time.perf_counter()
226
+ try:
227
+ while True:
228
+ if not self.is_locked:
229
+ _LOGGER.debug("Attempting to acquire lock %s on %s", lock_id, lock_filename)
230
+ await self._run_internal_method(self._acquire)
231
+ if self.is_locked:
232
+ _LOGGER.debug("Lock %s acquired on %s", lock_id, lock_filename)
233
+ break
234
+ if blocking is False:
235
+ _LOGGER.debug("Failed to immediately acquire lock %s on %s", lock_id, lock_filename)
236
+ raise Timeout(lock_filename) # noqa: TRY301
237
+ if 0 <= timeout < time.perf_counter() - start_time:
238
+ _LOGGER.debug("Timeout on acquiring lock %s on %s", lock_id, lock_filename)
239
+ raise Timeout(lock_filename) # noqa: TRY301
240
+ msg = "Lock %s not acquired on %s, waiting %s seconds ..."
241
+ _LOGGER.debug(msg, lock_id, lock_filename, poll_interval)
242
+ await asyncio.sleep(poll_interval)
243
+ except BaseException: # Something did go wrong, so decrement the counter.
244
+ self._context.lock_counter = max(0, self._context.lock_counter - 1)
245
+ raise
246
+ return AsyncAcquireReturnProxy(lock=self)
247
+
248
+ async def release(self, force: bool = False) -> None: # type: ignore[override] # noqa: FBT001, FBT002
249
+ """
250
+ Releases the file lock. Please note, that the lock is only completely released, if the lock counter is 0.
251
+ Also note, that the lock file itself is not automatically deleted.
252
+
253
+ :param force: If true, the lock counter is ignored and the lock is released in every case/
254
+
255
+ """
256
+ if self.is_locked:
257
+ self._context.lock_counter -= 1
258
+
259
+ if self._context.lock_counter == 0 or force:
260
+ lock_id, lock_filename = id(self), self.lock_file
261
+
262
+ _LOGGER.debug("Attempting to release lock %s on %s", lock_id, lock_filename)
263
+ await self._run_internal_method(self._release)
264
+ self._context.lock_counter = 0
265
+ _LOGGER.debug("Lock %s released on %s", lock_id, lock_filename)
266
+
267
+ async def _run_internal_method(self, method: Callable[[], Any]) -> None:
268
+ if asyncio.iscoroutinefunction(method):
269
+ await method()
270
+ elif self.run_in_executor:
271
+ loop = self.loop or asyncio.get_running_loop()
272
+ await loop.run_in_executor(self.executor, method)
273
+ else:
274
+ method()
275
+
276
+ def __enter__(self) -> NoReturn:
277
+ """
278
+ Replace old __enter__ method to avoid using it.
279
+
280
+ NOTE: DO NOT USE `with` FOR ASYNCIO LOCKS, USE `async with` INSTEAD.
281
+
282
+ :return: none
283
+ :rtype: NoReturn
284
+ """
285
+ msg = "Do not use `with` for asyncio locks, use `async with` instead."
286
+ raise NotImplementedError(msg)
287
+
288
+ async def __aenter__(self) -> Self:
289
+ """
290
+ Acquire the lock.
291
+
292
+ :return: the lock object
293
+
294
+ """
295
+ await self.acquire()
296
+ return self
297
+
298
+ async def __aexit__(
299
+ self,
300
+ exc_type: type[BaseException] | None,
301
+ exc_value: BaseException | None,
302
+ traceback: TracebackType | None,
303
+ ) -> None:
304
+ """
305
+ Release the lock.
306
+
307
+ :param exc_type: the exception type if raised
308
+ :param exc_value: the exception value if raised
309
+ :param traceback: the exception traceback if raised
310
+
311
+ """
312
+ await self.release()
313
+
314
+ def __del__(self) -> None:
315
+ """Called when the lock object is deleted."""
316
+ with contextlib.suppress(RuntimeError):
317
+ loop = self.loop or asyncio.get_running_loop()
318
+ if not loop.is_running(): # pragma: no cover
319
+ loop.run_until_complete(self.release(force=True))
320
+ else:
321
+ loop.create_task(self.release(force=True))
322
+
323
+
324
+ class AsyncSoftFileLock(SoftFileLock, BaseAsyncFileLock):
325
+ """Simply watches the existence of the lock file."""
326
+
327
+
328
+ class AsyncUnixFileLock(UnixFileLock, BaseAsyncFileLock):
329
+ """Uses the :func:`fcntl.flock` to hard lock the lock file on unix systems."""
330
+
331
+
332
+ class AsyncWindowsFileLock(WindowsFileLock, BaseAsyncFileLock):
333
+ """Uses the :func:`msvcrt.locking` to hard lock the lock file on windows systems."""
334
+
335
+
336
+ __all__ = [
337
+ "AsyncAcquireReturnProxy",
338
+ "AsyncSoftFileLock",
339
+ "AsyncUnixFileLock",
340
+ "AsyncWindowsFileLock",
341
+ "BaseAsyncFileLock",
342
+ ]
lib/python3.12/site-packages/filelock/py.typed ADDED
File without changes
lib/python3.12/site-packages/filelock/version.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
6
+ TYPE_CHECKING = False
7
+ if TYPE_CHECKING:
8
+ from typing import Tuple
9
+ from typing import Union
10
+
11
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
12
+ else:
13
+ VERSION_TUPLE = object
14
+
15
+ version: str
16
+ __version__: str
17
+ __version_tuple__: VERSION_TUPLE
18
+ version_tuple: VERSION_TUPLE
19
+
20
+ __version__ = version = '3.18.0'
21
+ __version_tuple__ = version_tuple = (3, 18, 0)