pufferlib
यह क्या करती है
PufferLib AI (artificial intelligence) को गेम खेलना या दूसरे काम करना सिखाने में मदद करता है। यह अलग-अलग सॉफ़्टवेयर वर्शन को मैनेज करता है, ताकि सब कुछ सही तरीके से चले।
कब इस्तेमाल करें
- ✓किसी नए गेम के लिए AI को ट्रेन करते समय।
- ✓AI को अलग-अलग environment वर्शन के साथ ढालते समय।
- ✓AI की ट्रेनिंग की प्रगति को सुरक्षित तरीके से जांचते समय।
Skill का लिंक
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/pufferlib/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“PufferLib वर्शन 3.0.0 का इस्तेमाल करके मैं AI को गेम खेलना कैसे सिखा सकता हूं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
PufferLib सॉफ़्टवेयर वर्शन मैनेज करता है और पक्का करता है कि ट्रेनिंग environment और AI policies आपस में मेल खाते हों। ट्रेनिंग से पहले इन environments को टेस्ट और वैलिडेट करने के टूल भी देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
PufferLib
Choose the version before choosing an API. Reviewed 2026-10-01:
| Profile | Status | Main use |
|---|---|---|
Native source 5.0 |
Current default branch and live documentation | C/CUDA environments, native trainer; CPU evaluation only |
pufferlib==3.0.0 |
Latest PyPI release, published 2025-06-23; sdist only | Python/Gymnasium/PettingZoo adaptation and Torch PuffeRL |
Pinned source 4.0 |
Historical snapshot | C Ocean interface with an optional Torch fallback |
For 5.0, read references/native-5.md. The reviewed
revision is 6ffa5b10dbbbe4d1e8288367c7d9d3acd3bad4a2. Its CLI is
./puffer train after building an environment, not puffer train ENV_NAME.
There is no 5.0 Python emulation/vector API or --slowly fallback.
The bundled plan schema deliberately supports only 3.0 and pinned 4.0; it does
not launch training. All native/PufferLib training examples are source-reviewed,
illustrative, and not executed in this review. Bundled synthetic checks are
executed CPU tests, not evidence of PufferLib installation or learning quality.
The PyPI sdist was hash-verified and its Python sources inspected; the moving
3.0 branch differs, including its load_policy and logger contracts.
Safe defaults
- Start with bundled synthetic, CPU-only, network-free tools.
- Do not import an arbitrary environment by dotted path. Bundled tools accept only allowlisted built-ins and slug identifiers.
- Do not install or execute an unreviewed environment package, native extension, ROM, map, checkpoint, or pickle file.
- Verify official source, immutable revision, licenses, checksums or attestations, and build hooks. Sandbox native builds and first execution.
- Cap steps, environments, agents, workers, threads, buffers, memory, disk, render size, and wall time.
- Keep training and evaluation environments/seeds separate.
- Default logging to local/none. External logging requires explicit opt-in, disclosure acknowledgment, and separate artifact-upload approval.
- Never pass W&B or Neptune credentials via CLI, INI, JSON, tags, run names, or logger configuration. Never print them.
- Never dump all environment variables or recursively search for
.env. - Hash checkpoint bytes before trusted, sandboxed loading; metadata inspection is not proof of safety.
First local checks
All bundled CLIs are dependency-free and emit strict JSON:
python3 scripts/env_template.py --help
python3 scripts/env_contract_validator.py
python3 scripts/benchmark_vectorization.py --backend serial
python3 scripts/train_template.py
python3 scripts/validate_plan.py
python3 scripts/repro_plan.py
Defaults are synthetic, deterministic, bounded, local, CPU-only, no-network, and dry-run where training would otherwise occur.
Installation and provenance
Published 3.0.0
PyPI supplies only pufferlib-3.0.0.tar.gz:
sha256: 7df3a3e3f5f894d78d2a1f5374097890aec01473183e748abefe4f3faa10eaa9
Requires-Python: >=3.9
After source/build review, create a pinned uv project:
uv venv --python 3.11
uv add --exact --no-sync "pufferlib==3.0.0"
uv lock
uv sync --frozen
These installation commands are illustrative and were not executed.
Commit pyproject.toml and uv.lock; verify the archive digest and every
resolved dependency. The source build can compile native code and fetch build
assets, so resolve/build in a sandbox without credentials or sensitive mounts.
The archive declares NumPy <2, Gymnasium <=0.29.1, and PettingZoo <=1.24.1;
latest Gymnasium/NumPy are not valid substitutes for this profile. Its setup
supports Linux/macOS and rejects other systems. Python classifiers alone do
not establish a successful native build. The uploaded metadata does not pin Torch or CUDA; do not claim a supported CUDA
matrix that PyPI does not declare.
Pinned 4.0 source
The reviewed branch head on 2026-07-23 was:
25647630e1b15330bb3153a5a0d3ff8d234c3acf
Pin the commit, not branch 4.0:
uv add --no-sync \
"pufferlib @ git+https://github.com/PufferAI/PufferLib.git@25647630e1b15330bb3153a5a0d3ff8d234c3acf"
uv lock
The reviewed 4.0 package declares Python >=3.10 and Torch >=2.9. The reviewed
PufferTank snapshot uses Ubuntu 24.04, Python 3.12, and an NVIDIA CUDA
13.0.2/cuDNN development image with the cu130 Torch index, but does not pin
the exact Torch wheel or all system packages. Treat it as a reference, not a
…
अक्सर पूछे जाने वाले सवाल
PufferLib में 'profiles' क्या होते हैं?
Profiles एक तरह की 'सेटिंग्स' होती हैं, जो तय करती हैं कि आप PufferLib का कौन सा वर्शन और कौन से फ़ीचर इस्तेमाल कर रहे हैं। नवीनतम वर्शन, प्रकाशित (published) वर्शन और एक पुराने वर्शन के लिए अलग profiles हैं।
'version-aware guidance' का क्या मतलब है?
इसका मतलब है कि PufferLib आपकी ज़रूरत के हिसाब से सही सॉफ़्टवेयर वर्शन चुनने और इस्तेमाल करने में मदद करता है, ताकि कंपैटिबिलिटी की दिक्कतें न आएं।
क्या बिना जांचे गए environments इस्तेमाल करना सुरक्षित है?
नहीं, PufferLib सख्ती से सलाह देता है कि आप सिर्फ़ वही environments, packages या फ़ाइलें इस्तेमाल करें जो सुरक्षा और सही काम के लिए जांचे और वैरिफ़ाई किए गए हों।
जानकारी
लेखक का मूल विवरण
Version-aware guidance for PufferLib reinforcement-learning environments, vectorization, policies, PuffeRL training, evaluation, and safe checkpoint review. Covers the native 5.0 build and environment API, published 3.0.0 Gymnasium/PettingZoo adaptation, and a pinned historical 4.0 profile.
लोकप्रियता
- GitHub स्टार
- 51k
- रैंकिंग में स्थान
- #3535
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
13c-metabolic-flux
51kकार्बन-13 आइसोटोप ट्रेसिंग डेटा से मेटाबोलिक फ़्लक्स का अनुमान लगाता है। कोशिका के मेटाबॉलिज़्म और बायोकेमिकल मार्गों का विश्लेषण करने के लिए यह उपयोगी है।
adaptyv
51kAdaptyv API का उपयोग करके प्रोटीन कैरेक्टराइज़ेशन प्रयोग डिज़ाइन करता है। लागत का अनुमान लगाने, सीक्वेंस सबमिट करने और लैब के नतीजों पर नज़र रखने में मदद करता है।
aeon
51kटाइम सीरीज़ डेटा पर मशीन लर्निंग के काम करता है। क्रमबद्ध डेटा में वर्गीकरण, पूर्वानुमान, एनोमली डिटेक्शन और पैटर्न खोजने के लिए यह उपयोगी है।
alphagenome
51kजेनेटिक वेरिएंट्स के पहले से गणना किए गए जीनोमिक प्रभाव देखता है। वेरिएंट का जीनोम पर असर समझने के लिए स्कोर और स्पष्टीकरण देता है।
मिलती-जुलती skills
pytorch-patterns
280kआपके एजेंट को machine learning models के लिए PyTorch इस्तेमाल करने में मदद करता है। कुशल model training के best practices लागू करता है और नतीजों को दोहराने लायक रखता है।
evm-token-decimals
280kयह आपके एजेंट को अलग-अलग blockchain networks पर decimal numbers की गलतियों से बचने में मदद करता है। यह transactions और calculations में token values सही रखने का ध्यान रखता है।
ito-inference
280kआपके एजेंट को AI models की उपलब्धता जाँचने देता है। यह compute request को तैयार model service से जोड़ता है।