### Install example-specific requirements Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/README.md Command to install dependencies for a specific example folder. ```bash pip install -r requirements.txt ``` -------------------------------- ### nuScenes Setup Source: https://github.com/xiaomi-research/unidrivevla/blob/main/docs/installation.md Install nuScenes-specific requirements and build custom operations. ```bash pip install -r requirements/requirements_nusc.txt ``` ```bash cd nuScenes/projects/mmdet3d_plugin/ops pip install -e . --no-build-isolation cd ../../../.. ``` -------------------------------- ### Install Neptune Client Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/README.md Installation commands for the Neptune client library. ```bash pip install neptune ``` ```bash conda install -c conda-forge neptune ``` -------------------------------- ### Running Examples on Remote Hardware Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/README.md Commands to install Runhouse and execute example scripts on various remote hardware configurations. ```bash # First install runhouse: pip install runhouse # For an on-demand V100 with whichever cloud provider you have configured: python run_on_remote.py \ --example pytorch/text-generation/run_generation.py \ --model_type=gpt2 \ --model_name_or_path=openai-community/gpt2 \ --prompt "I am a language model and" # For byo (bring your own) cluster: python run_on_remote.py --host --user --key_path \ --example # For on-demand instances python run_on_remote.py --instance --provider \ --example ``` -------------------------------- ### Install Transformers from source Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/README.md Commands to clone the repository and install the library in a virtual environment. ```bash git clone https://github.com/huggingface/transformers cd transformers pip install . ``` -------------------------------- ### Install Documentation Builder Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/CONTRIBUTING.md Command to install the documentation builder tool. ```bash pip install hf-doc-builder ``` -------------------------------- ### Install Cookiecutter Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/templates/adding_a_new_example_script/README.md Install the cookiecutter tool required to generate the example script template. ```bash pip install cookiecutter ``` -------------------------------- ### Install Accelerate Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/multiple-choice/README.md Install the Accelerate library required for custom training loops. ```bash pip install git+https://github.com/huggingface/accelerate ``` -------------------------------- ### Run example tests with pytest Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/CONTRIBUTING.md Install requirements and execute tests for a specific example directory. ```bash pip install -r examples/xxx/requirements.txt # only needed the first time python -m pytest -n auto --dist=loadfile -s -v ./examples/pytorch/text-classification ``` -------------------------------- ### Setup MMDetection3D from Scratch Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/getting_started.md A complete script to create a conda environment and install MMDetection3D along with its dependencies. ```shell conda create -n open-mmlab python=3.7 -y conda activate open-mmlab # install latest PyTorch prebuilt with the default prebuilt CUDA version (usually the latest) conda install -c pytorch pytorch torchvision -y # install mmcv pip install mmcv-full # install mmdetection pip install git+https://github.com/open-mmlab/mmdetection.git # install mmsegmentation pip install git+https://github.com/open-mmlab/mmsegmentation.git # install mmdetection3d git clone https://github.com/open-mmlab/mmdetection3d.git cd mmdetection3d pip install -v -e . ``` -------------------------------- ### Build and Install GPU Version Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Execute the build and installation commands for the GPU-enabled version. ```shell # build python setup.py build_ext # if success, cl will be launched to compile ops # install python setup.py develop ``` -------------------------------- ### Start Training Workflow Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/understand_mmcv/runner.md Execute the training process using the configured workflow. ```python # workflow is typically set as: workflow = [('train', 1)] # here the training begins. runner.run(data_loaders, cfg.workflow) ``` -------------------------------- ### Install and Login to Weights & Biases Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/README.md Commands to install the W&B package and authenticate the environment. ```bash pip install wandb ``` ```bash wandb login ``` -------------------------------- ### Define and Load a Basic Config Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/understand_mmcv/config.md Example of a simple Python configuration file and how to load it using Config.fromfile. ```python a = 1 b = dict(b1=[0, 1, 2], b2=None) c = (1, 2) d = 'string' ``` ```python >>> cfg = Config.fromfile('test.py') >>> print(cfg) >>> dict(a=1, ... b=dict(b1=[0, 1, 2], b2=None), ... c=(1, 2), ... d='string') ``` -------------------------------- ### Generate Example Script Template Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/templates/adding_a_new_example_script/README.md Run the cookiecutter command within the examples folder to generate the pre-filled template structure. ```bash cookiecutter ../templates/adding_a_new_example_script/ ``` -------------------------------- ### Install ms-swift Environment Source: https://github.com/xiaomi-research/unidrivevla/blob/main/docs/vlm_pretraining.md Install the ms-swift library within the qwenvl3 directory to enable Megatron-LM backend support. ```bash cd qwenvl3 pip install ms-swift # Ensure swift/cli/_megatron/sft.py is available ``` -------------------------------- ### Bench2Drive Setup Source: https://github.com/xiaomi-research/unidrivevla/blob/main/docs/installation.md Configure dependencies for Bench2Drive training and evaluation, including CARLA 0.9.15. ```bash pip install -r requirements/requirements_b2d.txt ``` ```bash conda create -n unidrivevla_eval python=3.8 conda activate unidrivevla_eval pip install -r requirements/requirements_b2d.txt ``` ```bash cd third_party/mmcv-1.7.2 export MMCV_WITH_OPS=1 export FORCE_CUDA=1 export MMCV_NO_Compiler_CHECK=1 pip install -r requirements.txt python setup.py build_ext --inplace pip install -e . cd ../.. cd third_party/mmdetection3d-1.0.0rc6 pip install -e . cd ../.. ``` ```bash cd third_party/transformers-4.57.1 pip install -e . cd ../.. ``` ```bash mkdir -p carla && cd carla wget https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/CARLA_0.9.15.tar.gz wget https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/AdditionalMaps_0.9.15.tar.gz tar -xvf CARLA_0.9.15.tar.gz cd Import && tar -xvf ../AdditionalMaps_0.9.15.tar.gz cd .. && bash ImportAssets.sh ``` ```bash export CARLA_ROOT=/path/to/unidrivevla/carla echo "$CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.15-py3.7-linux-x86_64.egg" >> $CONDA_PREFIX/lib/python3.9/site-packages/carla.pth ``` -------------------------------- ### Set Up Development Environment Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/templates/adding_a_new_model/open_model_proposals/ADD_BIG_BIRD.md Commands to create a virtual environment and install the Transformers library in editable mode with development dependencies. ```bash python -m venv .env source .env/bin/activate pip install -e ".[dev]" ``` -------------------------------- ### Install spconv2.0 Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/getting_started.md Commands to install spconv2.0 for optimized GPU memory usage. ```bash pip install cumm-cuxxx pip install spconv-cuxxx ``` -------------------------------- ### Install mmcv-full with Custom PyPI Source Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/installation.md Use a specific PyPI mirror to speed up the installation of dependencies. ```bash mim install mmcv-full -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -------------------------------- ### Implement benchmark with MetricsRecorder Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/benchmark/README.md Example implementation showing how to initialize a benchmark and record device and model measurements using MetricsRecorder. ```py from benchmarks_entrypoint import MetricsRecorder import psycopg2 def run_benchmark(logger: Logger, branch: str, commit_id: str, commit_msg: str, num_tokens_to_generate=100): metrics_recorder = MetricsRecorder(psycopg2.connect("dbname=metrics"), logger, branch, commit_id, commit_msg) benchmark_id = metrics_recorder.initialise_benchmark({"gpu_name": gpu_name, "model_id": model_id}) # To collect device measurements metrics_recorder.collect_device_measurements( benchmark_id, cpu_util, mem_megabytes, gpu_util, gpu_mem_megabytes ) # To collect your model measurements metrics_recorder.collect_model_measurements( benchmark_id, { "model_load_time": model_load_time, "first_eager_forward_pass_time_secs": first_eager_fwd_pass_time, "second_eager_forward_pass_time_secs": second_eager_fwd_pass_time, "first_eager_generate_time_secs": first_eager_generate_time, "second_eager_generate_time_secs": second_eager_generate_time, "time_to_first_token_secs": time_to_first_token, "time_to_second_token_secs": time_to_second_token, "time_to_third_token_secs": time_to_third_token, "time_to_next_token_mean_secs": mean_time_to_next_token, "first_compile_generate_time_secs": first_compile_generate_time, "second_compile_generate_time_secs": second_compile_generate_time, "third_compile_generate_time_secs": third_compile_generate_time, "fourth_compile_generate_time_secs": fourth_compile_generate_time, }, ) ``` -------------------------------- ### Install mmcv-full Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Commands to compile and install mmcv-full with MLU support enabled. ```bash cd mmcv export MMCV_WITH_OPS=1 export FORCE_MLU=1 python setup.py install ``` -------------------------------- ### Install MMDetection3D Source: https://github.com/xiaomi-research/unidrivevla/blob/main/docs/installation.md Install the MMDetection3D dependency from the third-party directory. ```bash cd third_party/mmdetection3d-1.0.0rc6 pip install -e . --no-build-isolation cd ../.. ``` -------------------------------- ### Install PyTorch Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Install the appropriate PyTorch version based on hardware requirements. ```powershell # CUDA version (mmcv) PS C:\Users\xxx> conda install pytorch torchvision cudatoolkit=10.2 -c pytorch # CPU version (mmcv) PS C:\Users\xxx> conda install install pytorch torchvision cpuonly -c pytorch ``` -------------------------------- ### Install and configure Accelerate Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/README.md Commands to install the development version of Accelerate and configure the environment for distributed training. ```bash pip install git+https://github.com/huggingface/accelerate ``` ```bash accelerate config ``` ```bash accelerate test ``` ```bash accelerate launch path_to_script.py --args_to_script ``` -------------------------------- ### Install pre-commit hooks Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/CONTRIBUTING.md Install and configure pre-commit to ensure code style compliance. ```shell pip install -U pre-commit pre-commit install ``` -------------------------------- ### Configure Accelerate Environment Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/instance-segmentation/README.md Initial setup command to configure the training environment for Accelerate. ```bash accelerate config ``` -------------------------------- ### Render Documentation Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/CONTRIBUTING.md Commands to install documentation dependencies and build the HTML documentation. ```shell pip install -r requirements/docs.txt cd docs/zh_cn/ # or docs/en make html # check file in ./docs/zh_cn/_build/html/index.html ``` -------------------------------- ### Setup CARLA 0.9.15 Environment Source: https://github.com/xiaomi-research/unidrivevla/blob/main/Bench2Drive/bench2drive/README.md Commands to download, extract, and configure the CARLA simulator environment. ```bash mkdir carla cd carla wget https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/CARLA_0.9.15.tar.gz tar -xvf CARLA_0.9.15.tar.gz cd Import && wget https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/AdditionalMaps_0.9.15.tar.gz cd .. && bash ImportAssets.sh export CARLA_ROOT=YOUR_CARLA_PATH echo "$CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.15-py3.7-linux-x86_64.egg" >> YOUR_CONDA_PATH/envs/YOUR_CONDA_ENV_NAME/lib/python3.7/site-packages/carla.pth # python 3.8 also works well, please set YOUR_CONDA_PATH and YOUR_CONDA_ENV_NAME ``` -------------------------------- ### Install and Configure Transformers Source: https://github.com/xiaomi-research/unidrivevla/blob/main/docs/installation.md Install the required transformers version and apply the custom model files for Qwen3-VL support. ```bash pip install transformers==4.57.1 ``` ```bash CONDA_PREFIX=/path/to/anaconda3/ or /path/to/anaconda3/envs/env_name/ TRANSFORMERS_DIR=${CONDA_PREFIX}/lib/python3.9/site-packages/transformers/ cp -r qwenvl3/transformers_replace/models ${TRANSFORMERS_DIR} ``` -------------------------------- ### Install Training Dependencies Source: https://github.com/xiaomi-research/unidrivevla/blob/main/docs/installation.md Install core training libraries including DeepSpeed and Flash Attention. ```bash pip install deepspeed==0.14.4 pip install peft pip install timm pip install qwen_vl_utils ``` ```bash pip install flash-attn --no-build-isolation ``` -------------------------------- ### Install libcst dependency Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/modular-transformers/README.md Required installation step before using the modular converter. ```bash pip install libcst ``` -------------------------------- ### Install ClearML package Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/README.md Install the necessary ClearML Python package via pip. ```bash pip install clearml ``` -------------------------------- ### Install mmcv-full Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/README.md Standard command to install the full version of MMCV using OpenMIM. ```bash pip install -U openmim mim install mmcv-full ``` -------------------------------- ### Install quality and testing dependencies Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/AGENTS.md Commands to install the necessary tools for code style enforcement and testing within the environment. ```bash pip install -e .[quality] ``` ```bash pip install -e .[testing] ``` ```bash pip install torch accelerate ``` -------------------------------- ### Install Build Dependencies Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Install optional and runtime dependencies required for compilation and execution. ```powershell (mmcv) PS C:\Users\xxx\mmcv> pip install -r requirements/optional.txt ``` ```shell (mmcv) PS C:\Users\xxx\mmcv> pip install -r requirements/runtime.txt ``` -------------------------------- ### Install PyTorch Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/getting_started.md Commands to install PyTorch and torchvision for either GPU or CPU platforms. ```shell conda install pytorch torchvision -c pytorch ``` ```shell conda install pytorch torchvision cpuonly -c pytorch ``` -------------------------------- ### Setup mosesdecoder and wmt16-scripts Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/legacy/seq2seq/romanian_postprocessing.md Clone the necessary repositories to the home directory to prepare the postprocessing environment. ```bash cd $HOME git clone git@github.com:moses-smt/mosesdecoder.git cd mosesdecoder git clone git@github.com:rsennrich/wmt16-scripts.git ``` -------------------------------- ### Install Comet ML Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/README.md Installation commands for Comet ML using pip or conda. ```bash pip install comet_ml ``` ```bash conda install -c comet_ml -c anaconda -c conda-forge comet_ml ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/CONTRIBUTING.md Commands to install the package in editable mode with development or quality dependencies. ```bash pip install -e ".[dev]" ``` ```bash pip install -e ".[quality]" ``` -------------------------------- ### Install Vulkan Dependencies Source: https://github.com/xiaomi-research/unidrivevla/blob/main/Bench2Drive/bench2drive/tools/check_carla.md Installs necessary Vulkan tools and geometry libraries for troubleshooting startup failures. ```bash apt install vulkan-tools # vulkaninfo apt install libgeos-dev ``` -------------------------------- ### PickleHandler implementation example Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/understand_mmcv/io.md A more complex example of a custom file handler for the pickle format. ```python import pickle class PickleHandler(mmcv.BaseFileHandler): def load_from_fileobj(self, file, **kwargs): return pickle.load(file, **kwargs) def load_from_path(self, filepath, **kwargs): return super(PickleHandler, self).load_from_path( filepath, mode='rb', **kwargs) def dump_to_str(self, obj, **kwargs): kwargs.setdefault('protocol', 2) return pickle.dumps(obj, **kwargs) def dump_to_fileobj(self, obj, file, **kwargs): kwargs.setdefault('protocol', 2) pickle.dump(obj, file, **kwargs) def dump_to_path(self, obj, filepath, **kwargs): super(PickleHandler, self).dump_to_path( obj, filepath, mode='wb', **kwargs) ``` -------------------------------- ### Build MMCV from source Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Standard steps to clone the repository and install the package in editable mode. ```bash git clone https://github.com/open-mmlab/mmcv.git cd mmcv ``` ```bash pip install -e . -v ``` ```bash python -c 'import mmcv;print(mmcv.__version__)' ``` -------------------------------- ### Full Traceback Reporting Example Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/ISSUES.md An example of how to provide a full traceback when reporting a software failure. ```python $ python -c 'import transformers' Traceback (most recent call last): File "", line 1, in File "/transformers/src/transformers/__init__.py", line 34, in from . import dependency_versions_check File "/transformers/src/transformers/dependency_versions_check.py", line 34, in from .utils import is_tokenizers_available File "/transformers/src/transformers/utils/import_utils.py", line 40, in from tqdm.auto import tqdm ModuleNotFoundError: No module named 'tqdm.auto' ``` -------------------------------- ### Launch Instance Segmentation Training Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/instance-segmentation/README.md Command to start the training process using the specified model, dataset, and hyperparameters. ```bash accelerate launch run_instance_segmentation_no_trainer.py \ --model_name_or_path facebook/mask2former-swin-tiny-coco-instance \ --output_dir finetune-instance-segmentation-ade20k-mini-mask2former-no-trainer \ --dataset_name qubvel-hf/ade20k-mini \ --do_reduce_labels \ --image_height 256 \ --image_width 256 \ --num_train_epochs 40 \ --learning_rate 1e-5 \ --lr_scheduler_type constant \ --per_device_train_batch_size 8 \ --gradient_accumulation_steps 2 \ --dataloader_num_workers 8 \ --push_to_hub ``` -------------------------------- ### Build and Install CPU Version Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Configure environment variables and build MMCV for CPU-only operations. ```powershell (mmcv) PS C:\Users\xxx\mmcv> $env:MMCV_WITH_OPS = 1 ``` ```powershell (mmcv) PS C:\Users\xxx\mmcv> python setup.py build_ext (mmcv) PS C:\Users\xxx\mmcv> python setup.py develop ``` -------------------------------- ### Configure Training Workflows Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/tutorials/customize_runtime.md Examples of setting the workflow list to control the sequence of training and validation phases. ```python workflow = [('train', 1)] ``` ```python [('train', 1), ('val', 1)] ``` -------------------------------- ### Install Unit Test Dependencies Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/CONTRIBUTING.md Commands to install necessary system dependencies for running unit tests on Linux or Windows. ```shell # Linux sudo apt-get update -y sudo apt-get install -y libturbojpeg sudo apt-get install -y ffmpeg # Windows conda install ffmpeg ``` -------------------------------- ### Validate MMCV installation Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Run the installation check script to verify the environment setup. ```powershell (mmcv) PS C:\Users\xxx\mmcv> python .dev_scripts/check_installation.py ``` -------------------------------- ### Install MMDeploy Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/tutorials/model_deployment.md Commands to clone the MMDeploy repository and initialize its submodules. ```bash git clone -b master git@github.com:open-mmlab/mmdeploy.git cd mmdeploy git submodule update --init --recursive ``` -------------------------------- ### Inference Execution Examples Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/1_exist_data_model.md Practical examples for testing specific models like VoteNet, SECOND, and PointPillars on various datasets. ```shell python tools/test.py configs/votenet/votenet_8x8_scannet-3d-18class.py \ checkpoints/votenet_8x8_scannet-3d-18class_20200620_230238-2cea9c3a.pth \ --show --show-dir ./data/scannet/show_results ``` ```shell python tools/test.py configs/votenet/votenet_8x8_scannet-3d-18class.py \ checkpoints/votenet_8x8_scannet-3d-18class_20200620_230238-2cea9c3a.pth \ --eval mAP --eval-options 'show=True' 'out_dir=./data/scannet/show_results' ``` ```shell python tools/test.py configs/votenet/votenet_8x8_scannet-3d-18class.py \ checkpoints/votenet_8x8_scannet-3d-18class_20200620_230238-2cea9c3a.pth \ --eval mAP ``` ```shell ./tools/slurm_test.sh ${PARTITION} ${JOB_NAME} configs/second/hv_second_secfpn_6x8_80e_kitti-3d-3class.py \ checkpoints/hv_second_secfpn_6x8_80e_kitti-3d-3class_20200620_230238-9208083a.pth \ --out results.pkl --eval mAP ``` ```shell ./tools/slurm_test.sh ${PARTITION} ${JOB_NAME} configs/pointpillars/hv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d.py \ checkpoints/hv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d_20200620_230405-2fa62f3d.pth \ --format-only --eval-options 'jsonfile_prefix=./pointpillars_nuscenes_results' ``` -------------------------------- ### Configure PartAggregationROIHead Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/tutorials/customize_models.md Example configuration for the PartAggregationROIHead and PartA2BboxHead components. ```python model = dict( ... roi_head=dict( type='PartAggregationROIHead', num_classes=3, semantic_head=dict( type='PointwiseSemanticHead', in_channels=16, extra_width=0.2, seg_score_thr=0.3, num_classes=3, loss_seg=dict( type='FocalLoss', use_sigmoid=True, reduction='sum', gamma=2.0, alpha=0.25, loss_weight=1.0), loss_part=dict( type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)), seg_roi_extractor=dict( type='Single3DRoIAwareExtractor', roi_layer=dict( type='RoIAwarePool3d', out_size=14, max_pts_per_voxel=128, mode='max')), part_roi_extractor=dict( type='Single3DRoIAwareExtractor', roi_layer=dict( type='RoIAwarePool3d', out_size=14, max_pts_per_voxel=128, mode='avg')), bbox_head=dict( type='PartA2BboxHead', num_classes=3, seg_in_channels=16, part_in_channels=4, seg_conv_channels=[64, 64], part_conv_channels=[64, 64], merge_conv_channels=[128, 128], down_conv_channels=[128, 256], bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder'), shared_fc_channels=[256, 512, 512, 512], cls_channels=[256, 256], reg_channels=[256, 256], dropout_ratio=0.1, roi_feat_size=14, with_corner_loss=True, loss_bbox=dict( type='SmoothL1Loss', beta=1.0 / 9.0, reduction='sum', loss_weight=1.0), loss_cls=dict( type='CrossEntropyLoss', use_sigmoid=True, reduction='sum', loss_weight=1.0))) ... ) ``` -------------------------------- ### Configure and Test Accelerate Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/multiple-choice/README.md Set up the environment and verify readiness for distributed training. ```bash accelerate config ``` ```bash accelerate test ``` -------------------------------- ### Example Input IDs Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/templates/adding_a_new_model/ADD_NEW_MODEL_PROPOSAL_TEMPLATE.md An example of an array of integers representing input IDs for a model. ```python input_ids = [0, 4, 4, 3, 2, 4, 1, 7, 19] ``` -------------------------------- ### Fine-tune with Pre-processed Dataset Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/translation/README.md Example using a pre-processed dataset for the en-de language pair. ```bash python run_translation.py \ --model_name_or_path google-t5/t5-small \ --do_train \ --do_eval \ --source_lang en \ --target_lang de \ --source_prefix "translate English to German: " \ --dataset_name stas/wmt14-en-de-pre-processed \ --output_dir /tmp/tst-translation \ --per_device_train_batch_size=4 \ --per_device_eval_batch_size=4 \ --overwrite_output_dir \ --predict_with_generate ``` -------------------------------- ### Run Dynamic Batch Size Example Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/legacy/seq2seq/README.md Executes the dynamic batch size configuration after preparing the length file. ```bash ./save_len_file.py Helsinki-NLP/opus-mt-en-ro wmt_en_ro ./dynamic_bs_example.sh --max_tokens_per_batch=2000 --output_dir benchmark_dynamic_bs ``` -------------------------------- ### Install Transformers via Package Manager Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/README.md Commands to install the Transformers library with PyTorch support using pip or uv. ```py # pip pip install "transformers[torch]" # uv uv pip install "transformers[torch]" ``` -------------------------------- ### Launch CARLA Server Source: https://github.com/xiaomi-research/unidrivevla/blob/main/Bench2Drive/bench2drive/tools/check_carla.md Starts the CARLA server in headless mode with specific performance settings. ```bash ./CarlaUE4.sh -RenderOffScreen -nosound -fps=10 -carla-rpc-port=2000 ``` -------------------------------- ### Install MMCV-full for Ascend NPU via pip Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Install the pre-compiled Ascend version of mmcv-full directly from the provided distribution link. ```bash pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/ascend/torch1.8.0/index.html ``` -------------------------------- ### Launch Distributed Training Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/multiple-choice/README.md Use the accelerate launcher to execute the training script across various hardware setups. ```bash export DATASET_NAME=swag accelerate launch run_swag_no_trainer.py \ --model_name_or_path google-bert/bert-base-cased \ --dataset_name $DATASET_NAME \ --max_seq_length 128 \ --per_device_train_batch_size 32 \ --learning_rate 2e-5 \ --num_train_epochs 3 \ --output_dir /tmp/$DATASET_NAME/ ``` -------------------------------- ### Install MMDetection3D Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/getting_started.md Final installation command for MMDetection3D. ```shell pip install -v -e . # or "python setup.py develop" ``` -------------------------------- ### Dynamic Installation Command Generator Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/get_started/installation.md This script handles UI interactions for dropdown menus and updates the installation command string based on selected versions. ```javascript let osVal, cudaVal, torchVal, mmcvVal; function clickOutside(targetDom, handler) { const clickHandler = (e) => { if (!targetDom || targetDom.contains(e.target)) return; handler?.(); document.removeEventListener('click', clickHandler, false); }; document.addEventListener('click', clickHandler, false); } function changeMMCV(val) { mmcvVal = val; change("select-mmcv"); } function changeTorch(val) { torchVal = val; change("select-torch"); } function changeCUDA(val) { cudaVal = val; change("select-cuda"); } function changeOS(val) { osVal = val; change("select-os"); } // 控制size大小相关的几个方法 function handleSelectMouseDown(id) { const dom = document.getElementById(id); if (!dom) return; const len = dom?.options?.length; if (len >= 10) { dom.size = 10; dom.style.zIndex = 100; } } function handleSelectClick() { const selects = Array.from(document.getElementsByTagName("select")); selects.forEach(select => { select.size = 1; }); } function handleSelectBlur(id) { const dom = document.getElementById(id); if (!dom) { // 如果没有指定特定的id,那就直接把所有的select都设置成size = 1 handleSelectClick(); return; } dom.size = 1; dom.style.zIndex = 1; } function changeCmd() { const cmd = document.getElementById("select-cmd"); let cmdString = "pip install mmcv=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html"; // e.g: pip install mmcv==2.0.0rc1 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9/index.html let cudaVersion; if (cudaVal === "cpu" || cudaVal === "mps") { cudaVersion = "cpu"; } else { cudaVersion = `cu${cudaVal.split(".").join("")}`; } const torchVersion = `torch${torchVal.substring(0, torchVal.length - 2)}`; cmdString = cmdString.replace("{cu_version}", cudaVersion).replace("{mmcv_version}", mmcvVal).replace("{torch_version}", torchVersion); cmd.textContent = cmdString; } // string数组去重 function unique(arr) { if (!arr || !Array.isArray(arr)) return []; return [...new Set(arr)]; } // 根据string数组生成option的DocumentFragment function genOptionFragment(data, id) { const name = id.includes("-")? id.split("-")[1] : id; const fragment = new DocumentFragment(); data.forEach(option => { const ele = document.createElement("option"); let text = `${name} ${option}`; if (name === "os" || option.toUpperCase() === "CPU" || option.toUpperCase() === "MPS") { text = `${option}`; } ele.textContent = text; // 添加value属性,方便下拉框选择时直接读到数据 ele.value = option; // 添加点击事件监听 ele.addEventListener('click', handleSelectClick); fragment.appendChild(ele); }); return fragment; } // 在dom树中找到id对应的dom(select元素),并将生成的options添加到元素内 function findAndAppend(data, id) { const fragment = genOptionFragment(data, id); const dom = document.getElementById(id); if (dom) dom.replaceChildren(fragment); } /** * change方法的重点在于 * 1. 各个下拉框数据的联动 * OS ==> cuda ==> torch ==> mmcv * 2. 命令行的修改 */ function change(id) { const order = ["select-mmcv", "select-torch", "select-cuda", "select-os"]; const idx = order.indexOf(id); if (idx === -1) return; const versionDetail = version[osVal]; if (idx >= 3) { // 根据os修改cuda let cuda = []; versionDetail.forEach(v => { cuda.push(v.cuda); }); cuda = unique(cuda); cudaVal = cuda[0]; findAndAppend(cuda, "select-cuda"); } if (idx >= 2) { // 根据cuda修改torch const torch = []; versionDetail.forEach(v => { if (v.cuda === cudaVal) torch.push(v.torch); }); torchVal = torch[0]; findAndAppend(torch, "select-torch"); } if (idx >= 1) { // 根据torch修改mmcv let mmcv = []; versionDetail.forEach(v => { ``` -------------------------------- ### Display Seq2SeqTrainer help options Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/legacy/seq2seq/README.md Run this command to view all available command-line arguments for the fine-tuning script. ```bash python finetune_trainer.py --help ``` -------------------------------- ### Run mmdet3d-serve container Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/useful_tools.md Starts the TorchServe container. Requires nvidia-docker for GPU support. ```shell docker run --rm \ --cpus 8 \ --gpus device=0 \ -p8080:8080 -p8081:8081 -p8082:8082 \ --mount type=bind,source=$MODEL_STORE,target=/home/model-server/model-store \ mmdet3d-serve:latest ``` -------------------------------- ### Configure and Launch Training with Accelerate Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/semantic-segmentation/README.md Commands to set up the environment, verify configuration, and initiate the training process for semantic segmentation. ```bash accelerate config ``` ```bash accelerate test ``` ```bash accelerate launch run_semantic_segmentation_no_trainer.py --output_dir segformer-finetuned-sidewalk --with_tracking --push_to_hub ``` -------------------------------- ### Install mmcv-full for PyTorch 1.3 Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/previous_versions.md Commands to install mmcv-full for PyTorch 1.3.0 across different hardware configurations. ```bash pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.3.0/index.html ``` ```bash pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.3.0/index.html ``` ```bash pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.3.0/index.html ``` -------------------------------- ### Install MMSegmentation Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/getting_started.md Commands to install MMSegmentation either directly or from source. ```shell pip install mmsegmentation ``` ```shell git clone https://github.com/open-mmlab/mmsegmentation.git cd mmsegmentation git checkout v0.20.0 # switch to v0.20.0 branch pip install -e . # or "python setup.py develop" ``` -------------------------------- ### Clone and Install BigBird Repository Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/templates/adding_a_new_model/open_model_proposals/ADD_BIG_BIRD.md Commands to clone the original BigBird repository and install it in editable mode. ```bash git clone https://github.com/google-research/bigbird.git cd big_bird pip install -e . ``` -------------------------------- ### Install MMDetection Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/getting_started.md Commands to install MMDetection either directly or from source. ```shell pip install mmdet ``` ```shell git clone https://github.com/open-mmlab/mmdetection.git cd mmdetection git checkout v2.24.0 # switch to v2.24.0 branch pip install -r requirements/build.txt pip install -v -e . # or "python setup.py develop" ``` -------------------------------- ### Initialize ClearML CLI Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/README.md Run the initialization command to configure ClearML credentials locally. ```bash clearml-init ``` -------------------------------- ### Registry and Dispatcher Implementation Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/compatibility.md Example of using the registry and dispatcher system to manage device-specific implementations for operators. ```c++ void ROIAlignForwardCUDAKernelLauncher(Tensor input, Tensor rois, Tensor output, Tensor argmax_y, Tensor argmax_x, int aligned_height, int aligned_width, float spatial_scale, int sampling_ratio, int pool_mode, bool aligned); void roi_align_forward_cuda(Tensor input, Tensor rois, Tensor output, Tensor argmax_y, Tensor argmax_x, int aligned_height, int aligned_width, float spatial_scale, int sampling_ratio, int pool_mode, bool aligned) { ROIAlignForwardCUDAKernelLauncher( input, rois, output, argmax_y, argmax_x, aligned_height, aligned_width, spatial_scale, sampling_ratio, pool_mode, aligned); } // register cuda implementation void roi_align_forward_impl(Tensor input, Tensor rois, Tensor output, Tensor argmax_y, Tensor argmax_x, int aligned_height, int aligned_width, float spatial_scale, int sampling_ratio, int pool_mode, bool aligned); REGISTER_DEVICE_IMPL(roi_align_forward_impl, CUDA, roi_align_forward_cuda); // roi_align.cpp // use the dispatcher to invoke different implementation depending on device type of input tensors. void roi_align_forward_impl(Tensor input, Tensor rois, Tensor output, Tensor argmax_y, Tensor argmax_x, int aligned_height, int aligned_width, float spatial_scale, int sampling_ratio, int pool_mode, bool aligned) { DISPATCH_DEVICE_IMPL(roi_align_forward_impl, input, rois, output, argmax_y, argmax_x, aligned_height, aligned_width, spatial_scale, sampling_ratio, pool_mode, aligned); } ``` -------------------------------- ### Clone and Install Original Model Repository Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/templates/adding_a_new_model/ADD_NEW_MODEL_PROPOSAL_TEMPLATE.md Commands to clone the original model repository and install it in editable mode for debugging. ```bash git clone [link to original repo].git cd [lowercase name of model] pip install -e . ``` -------------------------------- ### Configure and Launch Accelerate Training Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/object-detection/README.md Commands to set up the environment and execute the training script for object detection. ```bash accelerate config ``` ```bash accelerate test ``` ```bash accelerate launch run_object_detection_no_trainer.py \ --model_name_or_path "facebook/detr-resnet-50" \ --dataset_name cppe-5 \ --output_dir "detr-resnet-50-finetuned" \ --num_train_epochs 100 \ --image_square_size 600 \ --per_device_train_batch_size 8 \ --per_device_eval_batch_size 8 \ --checkpointing_steps epoch \ --learning_rate 5e-5 \ --ignore_mismatched_sizes \ --with_tracking \ --push_to_hub ``` -------------------------------- ### Verify PyTorch Installation Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/installation.md Check if PyTorch is correctly installed and identify its version. ```bash python -c 'import torch;print(torch.__version__)' ``` -------------------------------- ### Configure Learning Rate Schedules Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/tutorials/customize_runtime.md Examples of defining custom learning rate policies like Poly and CosineAnnealing in the configuration. ```python lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False) ``` ```python lr_config = dict( policy='CosineAnnealing', warmup='linear', warmup_iters=1000, warmup_ratio=1.0 / 10, min_lr_ratio=1e-5) ``` -------------------------------- ### Run 3D Segmentation Demo Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/demo.md General command structure and example for testing 3D segmentors on point cloud data. ```shell python demo/pc_seg_demo.py ${PCD_FILE} ${CONFIG_FILE} ${CHECKPOINT_FILE} [--device ${GPU_ID}] [--out-dir ${OUT_DIR}] [--show] ``` ```shell python demo/pc_seg_demo.py demo/data/scannet/scene0000_00.bin configs/pointnet2/pointnet2_ssg_16x2_cosine_200e_scannet_seg-3d-20class.py checkpoints/pointnet2_ssg_16x2_cosine_200e_scannet_seg-3d-20class_20210514_143644-ee73704a.pth ``` -------------------------------- ### Configuring the Custom Dataset Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/tutorials/customize_dataset.md Example configuration snippet to integrate the custom dataset into the training pipeline. ```python dataset_A_train = dict( type='MyDataset', ann_file = 'annotation.pkl', pipeline=train_pipeline ) ``` -------------------------------- ### Perform Hyperparameter Search Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/legacy/seq2seq/README.md Configuration and execution examples for running automated hyperparameter searches. ```bash --search "num_beams=5:10 length_penalty=0.8:1.0:1.2 early_stopping=true:false" ``` ```bash --num_beams 5 --length_penalty 0.8 --early_stopping true --num_beams 5 --length_penalty 0.8 --early_stopping false [...] --num_beams 10 --length_penalty 1.2 --early_stopping false ``` -------------------------------- ### Build and install MMCV-full for Ascend NPU from source Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/build.md Commands to pull the source code and compile MMCV with NPU support enabled. ```bash git pull https://github.com/open-mmlab/mmcv/tree/master ``` ```bash MMCV_WITH_OPS=1 MAX_JOBS=8 FORCE_NPU=1 python setup.py build_ext ``` ```bash MMCV_WITH_OPS=1 FORCE_NPU=1 python setup.py develop ``` -------------------------------- ### Initialize a Model and Access Configuration Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/templates/adding_a_new_model/open_model_proposals/ADD_BIG_BIRD.md Demonstrates loading a pre-trained model and accessing its associated configuration object. ```python # assuming that `brand_new_bert` belongs to the organization `brandy` model = BrandNewBertModel.from_pretrained("brandy/brand_new_bert") model.config # model has access to its config ``` -------------------------------- ### Install git-lfs Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/pytorch/audio-classification/README.md Installs the git-lfs package required for managing large model files. ```bash $ apt install git-lfs ``` -------------------------------- ### Example Tensor Output Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/templates/adding_a_new_model/open_model_proposals/ADD_BIG_BIRD.md A sample tensor output used for reference during the porting process. ```bash tensor([[-0.0818, 0.2207, -0.0749, -0.0030, 0.0045, -0.1569, -0.1598, 0.0212, -0.2077, 0.2157], [ 0.1044, 0.0201, 0.0990, 0.2482, 0.3116, 0.2509, 0.2866, -0.2190, 0.2166, -0.0212], [-0.2000, 0.1107, -0.1999, -0.3119, 0.1559, 0.0993, 0.1776, -0.1950, -0.1023, -0.0447], [-0.0888, -0.1092, 0.2281, 0.0336, 0.1817, -0.0115, 0.2096, 0.1415, -0.1876, -0.2467], [ 0.2208, -0.2352, -0.1426, -0.2636, -0.2889, -0.2061, -0.2849, -0.0465, 0.2577, 0.0402], [ 0.1502, 0.2465, 0.2566, 0.0693, 0.2352, -0.0530, 0.1859, -0.0604, 0.2132, 0.1680], [ 0.1733, -0.2407, -0.1721, 0.1484, 0.0358, -0.0633, -0.0721, -0.0090, 0.2707, -0.2509], [-0.1173, 0.1561, 0.2945, 0.0595, -0.1996, 0.2988, -0.0802, 0.0407, 0.1829, -0.1568], [-0.1164, -0.2228, -0.0403, 0.0428, 0.1339, 0.0047, 0.1967, 0.2923, 0.0333, -0.0536], [-0.1492, -0.1616, 0.1057, 0.1950, -0.2807, -0.2710, -0.1586, 0.0739, 0.2220, 0.2358]]). ``` -------------------------------- ### Example of a multi-line command line instruction Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/ISSUES.md Use backslashes to break up long command line arguments for better readability. ```bash cd examples/seq2seq torchrun --nproc_per_node=2 ./finetune_trainer.py \ --model_name_or_path sshleifer/distill-mbart-en-ro-12-4 --data_dir wmt_en_ro \ --output_dir output_dir --overwrite_output_dir \ --do_train --n_train 500 --num_train_epochs 1 \ --per_device_train_batch_size 1 --freeze_embeds \ --src_lang en_XX --tgt_lang ro_RO --task translation \ --fp16 ``` -------------------------------- ### Markdown Syntax Example Source: https://github.com/xiaomi-research/unidrivevla/blob/main/Bench2Drive/bench2drive/leaderboard/docs/README.md Demonstrates common Markdown formatting elements including headers, lists, styling, and links. ```markdown Syntax highlighted code block # Header 1 ## Header 2 ### Header 3 - Bulleted - List 1. Numbered 2. List **Bold** and _Italic_ and `Code` text [Link](url) and ![Image](src) ``` -------------------------------- ### Setup nuScenes Dataset Symbolic Link Source: https://github.com/xiaomi-research/unidrivevla/blob/main/docs/data_preparation.md Create the necessary directory structure and symbolic link for the nuScenes dataset. ```bash cd unidrivevla mkdir -p nuScenes/data/nuscenes ln -s /path/to/nuscenes/* /path/to/unidrivevla/nuScenes/data/nuscenes ``` -------------------------------- ### Install Minkowski Engine Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmdetection3d-1.0.0rc6/docs/en/getting_started.md Commands to install the Minkowski Engine sparse convolution backend. ```shell conda install openblas-devel -c anaconda pip install -U git+https://github.com/NVIDIA/MinkowskiEngine -v --no-deps --install-option="--blas_include_dirs=/opt/conda/include" --install-option="--blas=openblas" ``` -------------------------------- ### Switching Transformers Version Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/transformers-4.57.1/examples/README.md Use git to checkout a specific tag to ensure compatibility with older example scripts. ```bash git checkout tags/v3.5.1 ``` -------------------------------- ### Setup Bench2Drive Dataset Symbolic Link Source: https://github.com/xiaomi-research/unidrivevla/blob/main/docs/data_preparation.md Create the data directory and symbolic link for the Bench2Drive dataset. ```bash cd unidrivevla/Bench2Drive mkdir -p data ln -s /path/to/bench2drive/* ./data/bench2drive ``` -------------------------------- ### Install MMCV via pip Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/docs/en/get_started/installation.md Use this command to install the MMCV package in your environment. ```bash pip install mmcv ``` -------------------------------- ### Install mmcv Source: https://github.com/xiaomi-research/unidrivevla/blob/main/third_party/mmcv-1.7.2/README.md Standard command to install the lite version of MMCV using OpenMIM. ```bash pip install -U openmim mim install mmcv ```