For learning and testing various hugging face stuff through BrainLM.
Here I am using the nilearn test dataset to walk through BrainLM fine tuning and downstream tutorial.
The aim is to use the code as-is as much as possible.
Later we might try to improve the process....
Please use uv
to install this project for the smoothest experience.
git clone [email protected]:htwangtw/hfplayground.git
The brainLM submodule is for record keeping. However, if you wish to pull it, run:
git submodule update --init --recursive
On Rorqual, remember to add module:
module add cudacore/.12.6.2
module load httpproxy
With uv
uv venv
uv sync --extra build
uv sync --extra build --extra compile
You can either activate the environment with source .venv/bin/activate
and use this environment in the conventional python way,
or prepend any command you want to run with uv run
to activate the environment.
With uv
, example:
uv run invoke prepare.models
uv run invoke prepare.data
Or with your virtual environment
source .venv/bin/activate
invoke prepare.models
invoke prepare.atlas
invoke prepare.data
invoke prepare.brainlm-workflow-timeseries
invoke prepare.prepare.gigaconnectome-workflow-timeseries
Check out uv run invoke --list
for the commands and documentations.