mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-16 04:43:52 +08:00
Fix linting issues
This commit is contained in:
1 parent
10761460de
commit
32af0082c7
4 files changed
+6
-10
No files matched your search
Vendored
+1
-1
@@ -32,6 +32,6 @@
|
||||
"--good-names=e,c,i,j,x,y,lr,K,fx,fy,cx,cy,H,W,ts,t,u",
|
||||
"--disable=too-many-arguments",
|
||||
"--disable=fixme",
|
||||
"--disable-msg=too-many-locals"
|
||||
"--disable=too-many-locals"
|
||||
],
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class Trainer:
|
||||
def train_epoch(self):
|
||||
"""_summary_"""
|
||||
num_iters = 100
|
||||
for step in tqdm(range(num_iters)):
|
||||
for _ in tqdm(range(num_iters)):
|
||||
batch = next(iter(self.train_dataloader))
|
||||
self.train_iteration(batch)
|
||||
# TODO(): proper saving with the correct directory path and such
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
Field output tests
|
||||
"""
|
||||
import pytest
|
||||
import torch
|
||||
from torch import nn
|
||||
|
||||
@@ -19,7 +18,7 @@ def test_field_output():
|
||||
assert render_head.get_out_dim() == out_dim
|
||||
|
||||
x = torch.ones((9, in_dim))
|
||||
y = render_head(x)
|
||||
render_head(x)
|
||||
|
||||
|
||||
def test_density_output():
|
||||
@@ -29,7 +28,7 @@ def test_density_output():
|
||||
assert density_head.get_out_dim() == 1
|
||||
|
||||
x = torch.ones((9, in_dim))
|
||||
y = density_head(x)
|
||||
density_head(x)
|
||||
|
||||
|
||||
def test_rgb_output():
|
||||
@@ -39,4 +38,4 @@ def test_rgb_output():
|
||||
assert rgb_head.get_out_dim() == 3
|
||||
|
||||
x = torch.ones((9, in_dim))
|
||||
y = rgb_head(x)
|
||||
rgb_head(x)
|
||||
@@ -1,12 +1,9 @@
|
||||
"""
|
||||
Test samplers
|
||||
"""
|
||||
from random import uniform
|
||||
import pytest
|
||||
import torch
|
||||
from mattport.nerf.sampler import PDFSampler, UniformSampler
|
||||
|
||||
from mattport.structures.cameras import Rays
|
||||
from mattport.structures.rays import RayBundle
|
||||
|
||||
|
||||
@@ -45,7 +42,7 @@ def test_pdf_sampler():
|
||||
|
||||
# Just check that it doesn't crash. Need to add some actual tests.
|
||||
pdf_sampler = PDFSampler(num_samples)
|
||||
ray_samples = pdf_sampler(ray_bundle, coarse_ray_samples, density, num_samples)
|
||||
pdf_sampler(ray_bundle, coarse_ray_samples, density, num_samples)
|
||||
|
||||
# TODO Tancik: Add more precise tests
|
||||
|
||||
|
||||
Reference in new issue
Block a user