-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.txt
More file actions
88 lines (63 loc) · 4.05 KB
/
Copy pathexamples.txt
File metadata and controls
88 lines (63 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
================================================================================
env-doctor — CLI Showcase & Usage Guide
================================================================================
This file showcases various commands to diagnose and optimize your ML environment.
Assumes the database has been updated with 'uv run env-doctor update-db'.
--------------------------------------------------------------------------------
1. COMPATIBILITY CHECKING
--------------------------------------------------------------------------------
# Check a requirements file against the current system
uv run env-doctor check examples/compatible_requirements.txt
# Simulate checking for a Linux production cluster with CUDA 12.4
uv run env-doctor check examples/incompatible_requirements.txt --cuda 12.4 --platform linux
# Detect incompatibilities in a pyproject.toml for a Windows workstation with older CUDA
uv run env-doctor check examples/incompatible_pyproject.toml --cuda 12.1 --platform win32
# Detailed verbose output including rule UIDs
uv run env-doctor check examples/incompatible_requirements.txt -v
--------------------------------------------------------------------------------
2. STACK RECOMMENDATIONS
--------------------------------------------------------------------------------
# Get a recommendation for a new project using Transformers and TRL on Linux
uv run env-doctor recommend --package transformers --package trl --platform linux
# Find the best stack for a Windows machine with CUDA 12.1
uv run env-doctor recommend --cuda 12.1 --platform win32
# Non-interactive recommendation with minimum confidence threshold
uv run env-doctor recommend --package vllm --confidence production-tested --no-interactive
--------------------------------------------------------------------------------
3. ENVIRONMENT INSPECTION
--------------------------------------------------------------------------------
# Display current hardware and software status in a table
uv run env-doctor inspect
# Export full environment state to JSON for remote debugging
uv run env-doctor inspect --format json --save my_env.json
--------------------------------------------------------------------------------
4. DEPENDENCY PATCHING
--------------------------------------------------------------------------------
# Preview fixes for an incompatible requirements file
uv run env-doctor patch examples/incompatible_requirements.txt --dry-run
# Apply patches with an automatic backup
uv run env-doctor patch examples/incompatible_requirements.txt
--------------------------------------------------------------------------------
5. VRAM ESTIMATION
--------------------------------------------------------------------------------
# Estimate VRAM for Llama-3-8B using vLLM runtime
uv run env-doctor vram --model meta-llama/Meta-Llama-3-8B --runtime vllm
# Check if a 70B model fits on a single A100 (80GB) with 4-bit quantization
uv run env-doctor vram --model meta-llama/Llama-2-70b-hf --quantization 4bit
--------------------------------------------------------------------------------
6. STACK SUBMISSION
--------------------------------------------------------------------------------
# Submit your current stable environment as a new stack
# Automatically detects CUDA, Python, and all installed packages
uv run env-doctor submit-stack my-verified-config --desc "Standard configuration for H100 dev"
# Submit a specific minimal stack for Linux
uv run env-doctor submit-stack minimal-torch --cuda 12.1 --platform linux --no-current --package torch==2.3.1 --package transformers==4.40.0 --desc "Minimal LLM inference stack"
--------------------------------------------------------------------------------
7. DATABASE MANAGEMENT
--------------------------------------------------------------------------------
# Sync local database with the curated intelligence repository
uv run env-doctor update-db
# Point to a custom local repository for private company rules
uv run env-doctor repo set C:/path/to/my-private-rules
uv run env-doctor update-db
================================================================================