-
Notifications
You must be signed in to change notification settings - Fork 722
Use uv tool for isolate cicd env #2597
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
base: development
Are you sure you want to change the base?
Changes from 1 commit
3b2414b
283801d
8cc42c2
8ffc083
99d6abd
080bc26
14a36af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,16 @@ | |
"id": "JobRecommendationSystem_py", | ||
"steps": [ | ||
"source /intel/oneapi/intelpython/bin/activate", | ||
"conda env remove -n user_tensorflow-gpu", | ||
"conda create --name user_tensorflow-gpu --clone tensorflow-gpu", | ||
"conda activate user_tensorflow-gpu", | ||
"pip install -r requirements.txt", | ||
"python -m ipykernel install --user --name=user_tensorflow-gpu", | ||
"python JobRecommendationSystem.py" | ||
"conda activate tensorflow-gpu", | ||
"pip install uv", | ||
"uv init", | ||
"uv python pin $(which python)", | ||
"uv venv --system-site-packages", | ||
"uv add -r requirements.txt", | ||
"uv add seaborn", | ||
"uv add numpy==1.26.4", | ||
"uv run python -m spacy download en_core_web_sm", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. super nit but can have them in a single There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. refactored |
||
"uv run python JobRecommendationSystem.py" | ||
] | ||
} | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,16 @@ | |
"id": "intel pytorch gpu inference optimization with amp", | ||
"steps": [ | ||
"source /intel/oneapi/intelpython/bin/activate", | ||
"source activate pytorch-gpu", | ||
"pip install -r requirements.txt", | ||
"pip install jupyter ipykernel", | ||
"python -m ipykernel install --user --name=pytorch-gpu", | ||
"python IntelPyTorch_GPU_InferenceOptimization_with_AMP.py" | ||
"conda activate pytorch-gpu", | ||
"pip install uv notebook", | ||
"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 --dev ipykernel", | ||
"uv run ipython kernel install --user --name=pytorch-gpu", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have to install ipykernel if we not using it. I know its there in current JSON file, but its good opportunity to clean it up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed |
||
"uv run IntelPyTorch_GPU_InferenceOptimization_with_AMP.py" | ||
] | ||
} | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please install ipykernel in standard dependency? No need for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed |
||
"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" | ||
] | ||
} | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
###### Requirements ###### | ||
notebook | ||
matplot | ||
xgboost==0.81 | ||
xgboost==0.82 | ||
scikit-learn | ||
pandas |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't think we need kernel_name argument any more There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure, if the .ipynb file not specify the kernel name and command line also not include it, we might meet issue like |
||
] | ||
}] | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,16 +14,19 @@ | |
{ | ||
"env": [ | ||
"source /intel/oneapi/intelpython/bin/activate", | ||
"conda env remove -n user_tensorflow-gpu", | ||
"conda create --name user_tensorflow-gpu --clone tensorflow-gpu", | ||
"conda activate user_tensorflow-gpu", | ||
"pip install -r requirements.txt", | ||
"python -m ipykernel install --user --name=user_tensorflow-gpu" | ||
"conda activate tensorflow-gpu", | ||
"pip install uv notebook", | ||
"uv init", | ||
"uv python pin $(which python)", | ||
"uv venv --system-site-packages", | ||
"uv add -r requirements.txt", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here, notebook is install separately. Both notebook and ipykernel are not used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, removed |
||
"uv add --dev ipykernel", | ||
"uv run ipython kernel install --user --name=tensorflow-gpu" | ||
], | ||
"id": "inc_text_generation_lstm_py", | ||
"steps": [ | ||
"export ITEX_ENABLE_NEXTPLUGGABLE_DEVICE=0", | ||
"ITEX_NUM_EPOCHS=5 KERAS_NUM_EPOCHS=5 python TextGenerationModelTraining.py" | ||
"ITEX_NUM_EPOCHS=5 KERAS_NUM_EPOCHS=5 uv run TextGenerationModelTraining.py" | ||
] | ||
} | ||
] | ||
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason to activate conda environment? As far as I know, UV will create an isolated environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reply at below