Skip to content

Add uv support for sample ci validation #2594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
"steps": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate pytorch",
"python -m pip install -r requirements.txt",
"python -m ipykernel install --user --name=pytorch",
"python pytorch_training_avx512_bf16.py",
"python pytorch_training_amx_bf16.py",
"jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=pytorch --to notebook IntelPyTorch_TrainingOptimizations_AMX_BF16.ipynb"
"pip install uv",
"uv init",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv add -r requirements.txt",
"uv add --dev ipykernel notebook",
"uv run ipython kernel install --user --name pytorch",
"uv run python pytorch_training_avx512_bf16.py",
"uv run python pytorch_training_amx_bf16.py",
"uv run jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=pytorch --to notebook IntelPyTorch_TrainingOptimizations_AMX_BF16.ipynb"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
"steps": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate tensorflow",
"pip install -r requirements.txt --no-deps",
"pip install ipykernel jupyter",
"python Intel_TensorFlow_AMX_BF16_Inference.py",
"python -m ipykernel install --user --name=tensorflow",
"jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=tensorflow --to notebook IntelTensorFlow_AMX_BF16_Inference.ipynb"
"pip install uv",
"uv init",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv add -r requirements.txt",
"uv add numpy==1.26.4",
"uv add ipykernel jupyter notebook",
"uv run python Intel_TensorFlow_AMX_BF16_Inference.py",
"uv run python -m ipykernel install --user --name=tensorflow",
"uv run jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=tensorflow2 --to notebook IntelTensorFlow_AMX_BF16_Inference.ipynb"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@
"is_tune_model = True # or False\n",
"log_dir = \"logs\"\n",
"profiling_needed = False\n",
"execution_mode_param = os.getenv('execution_mode')\n",
"execution_mode = \"graph\"\n",
"if execution_mode_param == \"eager\":\n",
" execution_mode = \"eager\"\n",
"load_weights_dir = \"weights\"\n",
"save_weights_dir = \"weights\""
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@
"steps": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate tensorflow",
"pip install -r requirements.txt",
"pip install jupyter ipykernel",
"python Intel_TensorFlow_AMX_BF16_Training.py",
"python -m ipykernel install --user --name=tensorflow",
"jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=tensorflow --to notebook IntelTensorFlow_AMX_BF16_Training.ipynb"
"pip install uv",
"uv init",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv add -r requirements.txt",
"uv add --dev ipykernel notebook",
"uv add numpy==1.26.4",
"uv add keras==2.15.0",
"export execution_mode=eager",
"uv run python Intel_TensorFlow_AMX_BF16_Training.py -m eager",
"uv run ipython kernel install --user --name tensorflow",
"uv run jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=tensorflow --to notebook IntelTensorFlow_AMX_BF16_Training.ipynb"
]
}]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
accelerate==0.29.3
datasets==2.09.0
intel-extension-for-transformers==1.4.1
neural_speed==1.0
peft==0.10.0
accelerate
datasets
intel-extension-for-transformers
neural_speed
peft
sentencepiece
transformers==4.38.0
transformers
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate pytorch",
"pip install -r requirements.txt"
"pip install uv",
"uv init",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv add -r requirements.txt",
"uv add neural-compressor==2.6",
"uv add torch==2.5.0 torchvision==0.20.0"
],
"id": "itrex_quantize_transformer_models",
"steps": [
"python quantize_transformer_models_with_itrex.py --model_name \"Intel/neural-chat-7b-v3-1\" --quantize \"int4\" --max_new_tokens 50"
"uv run python quantize_transformer_models_with_itrex.py --model_name Intel/neural-chat-7b-v3-1 --quantize int4 --max_new_tokens 50"
]
}]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
"env": ["apt-get update && apt-get install -y libgl1 libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6",
"source /intel/oneapi/intelpython/bin/activate",
"conda activate pytorch",
"pip install -r requirements.txt",
"pip install ipykernel jupyter",
"python -m ipykernel install --user --name=pytorch"
"pip install uv",
"uv init",
"uv add --dev ipykernel notebook",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv add -r requirements.txt",
"uv run ipython kernel install --user --name pytorch"
],
"id": "quantize with inc",
"steps": [
"jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=pytorch --to notebook quantize_with_inc.ipynb"
"uv run jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=pytorch --to notebook quantize_with_inc.ipynb"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
"env": [
"source /intel/oneapi/intelpython/bin/activate",
"conda activate base",
"pip install -r requirements.txt"
"pip install uv",
"uv init",
"uv python pin $(which python)",
"uv venv --system-site-packages",
"uv add -r requirements.txt",
"uv add numpy==1.26.4"
],
"id": "idp_d4p_GS_py",
"steps": [
"python IntelPython_daal4py_GettingStarted.py"
"uv run python IntelPython_daal4py_GettingStarted.py"
]
}]
},
Expand Down