mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 19:33:46 +08:00
undo docs change
This commit is contained in:
1 parent
a0c38e8430
commit
c9151d4a90
21 files changed
+7547
-7568
No files matched your search
@@ -9,7 +9,7 @@ To launch training jobs automatically on each of these items, you can call:
|
||||
|
||||
```bash
|
||||
|
||||
./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m {METHOD_NAME} [-s] [-v {VIS}] [{GPU_LIST}]
|
||||
./scripts/benchmarking/launch_train_blender.sh -m {METHOD_NAME} [-s] [-v {VIS}] [{GPU_LIST}]
|
||||
```
|
||||
|
||||
Simply replace the arguments in brackets with the correct arguments.
|
||||
@@ -18,31 +18,31 @@ Simply replace the arguments in brackets with the correct arguments.
|
||||
- `-s`: Launch a single job per GPU.
|
||||
- `-v {VIS}`: Use another visualization than wandb, which is the default. Only other option is tensorboard.
|
||||
- `{GPU_LIST}`: (optional) Specify the list of gpus you want to use on your machine space separated. for instance, if you want to use GPU's 0-3, you will need to pass in `0 1 2 3`. If left empty, the script will automatically find available GPU's and distribute training jobs on the available GPUs.
|
||||
|
||||
|
||||
:::{admonition} Tip
|
||||
:class: info
|
||||
|
||||
To view all the arguments and annotations, you can run `./nerfstudio/scripts/benchmarking/launch_train_blender.sh --help`
|
||||
:::
|
||||
To view all the arguments and annotations, you can run `./scripts/benchmarking/launch_train_blender.sh --help`
|
||||
:::
|
||||
|
||||
|
||||
A full example would be:
|
||||
|
||||
- Specifying gpus
|
||||
|
||||
```bash
|
||||
./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m nerfacto 0 1 2 3
|
||||
```
|
||||
```bash
|
||||
./scripts/benchmarking/launch_train_blender.sh -m nerfacto 0 1 2 3
|
||||
```
|
||||
|
||||
- Automatically find available gpus
|
||||
```bash
|
||||
./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m nerfacto
|
||||
```
|
||||
```bash
|
||||
./scripts/benchmarking/launch_train_blender.sh -m nerfacto
|
||||
```
|
||||
|
||||
The script will automatically launch training on all of the items and save the checkpoints in an output directory with the experiment name and current timestamp.
|
||||
|
||||
## Evaluating trained Blender models
|
||||
|
||||
Once you have launched training, and training converges, you can test your method with `nerfstudio/scripts/benchmarking/launch_eval_blender.sh`.
|
||||
Once you have launched training, and training converges, you can test your method with `scripts/benchmarking/launch_eval_blender.sh`.
|
||||
|
||||
Say we ran a benchmark on 08-10-2022 for `instant-ngp`. By default, the train script will save the benchmarks in the following format:
|
||||
|
||||
@@ -65,7 +65,7 @@ If we wanted to run the benchmark on all the blender data for the above example,
|
||||
|
||||
```bash
|
||||
|
||||
./nerfstudio/scripts/benchmarking/launch_eval_blender.sh -m instant-ngp -o outputs/ -t 2022-08-10_172517 [{GPU_LIST}]
|
||||
./scripts/benchmarking/launch_eval_blender.sh -m instant-ngp -o outputs/ -t 2022-08-10_172517 [{GPU_LIST}]
|
||||
```
|
||||
|
||||
The flags used in the benchmarking script are defined as follows:
|
||||
@@ -90,4 +90,4 @@ outputs
|
||||
:class: warning
|
||||
|
||||
Since we are running multiple backgrounded processes concurrently with this script, please note the terminal logs may be messy.
|
||||
:::
|
||||
:::
|
||||
@@ -23,24 +23,7 @@ class RayGenerator(nn.Module):
|
||||
...
|
||||
```
|
||||
|
||||
Alternatively, you can also time parts of the code:
|
||||
```python
|
||||
...
|
||||
|
||||
def forward(self, ray_indices: TensorType["num_rays", 3]) -> RayBundle:
|
||||
# implementation here
|
||||
with profiler.time_function("code1"):
|
||||
# some code here
|
||||
...
|
||||
|
||||
with profiler.time_function("code2"):
|
||||
# some code here
|
||||
...
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
At termination of training or end of the training run, the profiler will print out the average execution time for all of the functions or code blocks that have the profiler tag.
|
||||
At termination of training or end of the training run, the profiler will print out the average execution time for all of the functions that have the profiler tag.
|
||||
|
||||
:::{admonition} Tip
|
||||
:class: info
|
||||
@@ -49,14 +32,6 @@ Use this profiler if there are *specific/individual functions* you want to measu
|
||||
:::
|
||||
|
||||
|
||||
#### Profiling with PyTorch profiler
|
||||
|
||||
If you want to profile the training or evaluation code and track the memory and CUDA kernel launches, consider using [PyTorch profiler](https://pytorch.org/tutorials/recipes/recipes/profiler_recipe.html).
|
||||
It will run the profiler for some selected step numbers, once with `CUDA_LAUNCH_BLOCKING=1`, once with `CUDA_LAUNCH_BLOCKING=0`.
|
||||
The PyTorch profiler can be enabled with `--logging.profiler=pytorch` flag.
|
||||
The outputs of the profiler are trace files stored in `{PATH_TO_MODEL_OUTPUT}/profiler_traces`, and can be loaded in Google Chrome by typing `chrome://tracing`.
|
||||
|
||||
|
||||
#### Profiling with PySpy
|
||||
|
||||
If you want to profile the entire codebase, consider using [PySpy](https://github.com/benfred/py-spy).
|
||||
|
||||
Reference in new issue
Block a user