-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix trl version to 0.2.12 and add Python venv instructions #143
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -42,12 +42,39 @@ | |
" -- -L 8888:localhost:8888" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "ba1788d9", | ||
"metadata": {}, | ||
"source": [ | ||
"Once we have access to the TPU VM, we can setup a virtual Python environment to install our packages in:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "0e686d24", | ||
"metadata": { | ||
"vscode": { | ||
"languageId": "shellscript" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Install the venv package for Python 3.10(adapt for your version)\n", | ||
"sudo apt-get install python3.10-venv\n", | ||
"# Create the virtual environment\n", | ||
"python -m venv optimum-tpu-env\n", | ||
"# Activate the virtual environment\n", | ||
"source optimum-tpu-env/bin/activate" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "79fda238", | ||
"metadata": {}, | ||
"source": [ | ||
"Once we have access to the TPU VM, we can clone the `optimum-tpu` repository containing the related notebook. Then we can install few packages used in this tutorial and launch the notebook:" | ||
"Next, we can clone the `optimum-tpu` repository containing the related notebook. Then we can install few packages used in this tutorial and launch the notebook:" | ||
] | ||
}, | ||
{ | ||
|
@@ -65,7 +92,7 @@ | |
"# Install Optimum tpu\n", | ||
"pip install -e . -f https://storage.googleapis.com/libtpu-releases/index.html\n", | ||
"# Install TRL and PEFT for training (see later how they are used)\n", | ||
"pip install trl peft\n", | ||
"pip install trl==0.2.12 peft\n", | ||
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. What is the problem with trl 0.2.13? Can you open an issue describing the issue you observed so that we can fix it in the future? 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. I noticed the same issue as @duncantech. Trl 0.2.13 as some breaking changes and so the interface is different. We need to adapt the examples to make them work with the latest version. I think this could be done in another PR tho 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. @baptistecolle can you open an issue to do that later? |
||
"# Install Jupyter notebook\n", | ||
"pip install -U jupyterlab notebook\n", | ||
"# Optionally, install widgets extensions for better rendering\n", | ||
|
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.
this could be an optional step. Could you rename it into something like: "While not strictly necessary, you can do an extra step to isolate your python environment by installing python-venv:" (or something like this).