diff --git a/nerfactory/cameras/cameras.py b/nerfactory/cameras/cameras.py index 54398109e..66cfc2ad8 100644 --- a/nerfactory/cameras/cameras.py +++ b/nerfactory/cameras/cameras.py @@ -256,8 +256,8 @@ class Cameras: Args: camera_idx: Index of the camera to convert. - image: An image in range [0, 1] that is encoded to a base64 string. Defaults to None. - max_size: Max size to resize the image to. Defaults to None. + image: An image in range [0, 1] that is encoded to a base64 string. + max_size: Max size to resize the image to if present. Returns: A JSON representation of the camera diff --git a/nerfactory/configs/base.py b/nerfactory/configs/base.py index 84a9bcf46..3db6903e8 100644 --- a/nerfactory/configs/base.py +++ b/nerfactory/configs/base.py @@ -128,7 +128,7 @@ class LocalWriterConfig(InstantiateConfig): """Instantiate local writer Args: - banner_messages: List of strings that always print at the bottom of screen. Defaults to None. + banner_messages: List of strings that always print at the bottom of screen. """ return self._target(self, banner_messages=banner_messages, **kwargs) @@ -257,9 +257,9 @@ class ModelConfig(InstantiateConfig): loss_coefficients: Dict[str, float] = to_immutable_dict({"rgb_loss_coarse": 1.0, "rgb_loss_fine": 1.0}) """Loss specific weights.""" num_coarse_samples: int = 64 - """Number of samples in coarse field evaluation. Defaults to 64""" + """Number of samples in coarse field evaluation""" num_importance_samples: int = 128 - """Number of samples in fine field evaluation. Defaults to 128""" + """Number of samples in fine field evaluation""" enable_density_field: bool = False """Whether to create a density field to filter samples.""" density_field_params: Dict[str, Any] = to_immutable_dict( @@ -292,20 +292,20 @@ class NerfWModelConfig(ModelConfig): ) """Loss specific weights.""" num_coarse_samples: int = 64 - """Number of samples in coarse field evaluation. Defaults to 64,""" + """Number of samples in coarse field evaluation.""" num_importance_samples: int = 64 - """Number of samples in fine field evaluation. Defaults to 128,""" + """Number of samples in fine field evaluation.""" uncertainty_min: float = 0.03 """This is added to the end of the uncertainty rendering operation. It's called 'beta_min' in other repos. This avoids calling torch.log() on a zero value, which would be undefined. - Defaults to 0.03.""" + """ num_images: int = 10000 # TODO: don't hardcode this """How many images exist in the dataset.""" appearance_embedding_dim: int = 48 - """Dimension of appearance embedding. Defaults to 48.""" + """Dimension of appearance embedding.""" transient_embedding_dim: int = 16 - """Dimension of transient embedding. Defaults to 16.""" + """Dimension of transient embedding.""" @dataclass diff --git a/nerfactory/datamanagers/dataloaders.py b/nerfactory/datamanagers/dataloaders.py index 495d8e186..b70e0625f 100644 --- a/nerfactory/datamanagers/dataloaders.py +++ b/nerfactory/datamanagers/dataloaders.py @@ -36,9 +36,9 @@ class CacheImageDataloader(DataLoader): Args: dataset: Dataset to sample from. - num_samples_to_collate: How many images to sample rays for each batch. Defaults to all images. - num_times_to_repeat_images: How often to collate new images. Defaults to every iteration. - device: Device to perform computation. Defaults to "cpu". + num_samples_to_collate: How many images to sample rays for each batch. -1 for all images. + num_times_to_repeat_images: How often to collate new images. + device: Device to perform computation. """ def __init__( diff --git a/nerfactory/datamanagers/dataparsers/instant_ngp_parser.py b/nerfactory/datamanagers/dataparsers/instant_ngp_parser.py index 17ca0c4af..a98dfd23c 100644 --- a/nerfactory/datamanagers/dataparsers/instant_ngp_parser.py +++ b/nerfactory/datamanagers/dataparsers/instant_ngp_parser.py @@ -42,7 +42,7 @@ class InstantNGPDataParserConfig(DataParserConfig): scale_factor: float = 1.0 """How much to scale the camera origins by.""" scene_scale: float = 0.33 - """How much to scale the scene. Defaults to 0.33""" + """How much to scale the scene.""" @dataclass diff --git a/nerfactory/datamanagers/dataparsers/mipnerf_parser.py b/nerfactory/datamanagers/dataparsers/mipnerf_parser.py index e4890aaa2..967f1e59a 100644 --- a/nerfactory/datamanagers/dataparsers/mipnerf_parser.py +++ b/nerfactory/datamanagers/dataparsers/mipnerf_parser.py @@ -38,13 +38,13 @@ class MipNerf360DataParserConfig(DataParserConfig): data_directory: Path = Path("data/mipnerf_360/garden") """directory specifying location of data""" downscale_factor: int = 1 - """How much to downscale images. Defaults to 1.""" + """How much to downscale images.""" val_skip: int = 8 - """1/val_skip images to use for validation. Defaults to 8.""" + """1/val_skip images to use for validation.""" auto_scale: bool = True - """Scale based on pose bounds. Defaults to True.""" + """Scale based on pose bounds.""" aabb_scale: float = 4 - """Scene scale, Defaults to 1.0.""" + """Scene scale.""" @dataclass diff --git a/nerfactory/datamanagers/dataparsers/nerfactory_parser.py b/nerfactory/datamanagers/dataparsers/nerfactory_parser.py index cd476e554..0f2b6e40c 100644 --- a/nerfactory/datamanagers/dataparsers/nerfactory_parser.py +++ b/nerfactory/datamanagers/dataparsers/nerfactory_parser.py @@ -42,15 +42,13 @@ class NerfactoryDataParserConfig(DataParserConfig): scale_factor: float = 1.0 """How much to scale the camera origins by.""" downscale_factor: int = 1 - """How much to downscale images. Defaults to 1.""" + """How much to downscale images.""" scene_scale: float = 4.0 - """How much to scale the scene. Defaults to 4.0""" + """How much to scale the scene.""" orientation_method: Literal["pca", "up"] = "up" - """The method to use for orientation. Either "pca" or "up".""" + """The method to use for orientation.""" train_split_percentage: float = 0.9 - """ - The percent of images to use for training. - The remaining images are for eval. Defaults to 0.9. + """The percent of images to use for training. The remaining images are for eval. """ diff --git a/nerfactory/datamanagers/dataparsers/record3d_parser.py b/nerfactory/datamanagers/dataparsers/record3d_parser.py index 5c33f9c08..28be87a09 100644 --- a/nerfactory/datamanagers/dataparsers/record3d_parser.py +++ b/nerfactory/datamanagers/dataparsers/record3d_parser.py @@ -40,14 +40,14 @@ class Record3DDataParserConfig(DataParserConfig): data_directory: Path = Path("data/record3d/garden") """Location of data""" val_skip: int = 8 - """1/val_skip images to use for validation. Defaults to 8.""" + """1/val_skip images to use for validation.""" aabb_scale: float = 4.0 - """Scene scale, Defaults to 4.0.""" + """Scene scale.""" orientation_method: Literal["pca", "up"] = "up" - """The method to use for orientation. Either "pca" or "up".""" + """The method to use for orientation""" max_dataset_size: int = 150 """Max number of images to train on. If the dataset has - more, images will be sampled approximately evenly. Defaults to 150.""" + more, images will be sampled approximately evenly.""" @dataclass diff --git a/nerfactory/engine/trainer.py b/nerfactory/engine/trainer.py index e00f77ff3..65aa25b89 100644 --- a/nerfactory/engine/trainer.py +++ b/nerfactory/engine/trainer.py @@ -66,8 +66,8 @@ class Trainer: Args: config: The configuration object. - local_rank: Local rank of the process. Defaults to 0. - world_size: World size of the process. Defaults to 1. + local_rank: Local rank of the process. + world_size: World size of the process. """ def __init__(self, config: cfg.Config, local_rank: int = 0, world_size: int = 1): diff --git a/nerfactory/fields/modules/encoding.py b/nerfactory/fields/modules/encoding.py index 4dd5be992..ebd588a92 100644 --- a/nerfactory/fields/modules/encoding.py +++ b/nerfactory/fields/modules/encoding.py @@ -68,8 +68,8 @@ class ScalingAndOffset(Encoding): Args: in_dim: Input dimension of tensor - scaling: Scaling applied to tensor. Defaults to 1.0. - offset: Offset applied to tensor. Defaults to 0.0. + scaling: Scaling applied to tensor. + offset: Offset applied to tensor. """ def __init__(self, in_dim: int, scaling: float = 1.0, offset: float = 0.0) -> None: @@ -127,7 +127,7 @@ class NeRFEncoding(Encoding): Args: in_tensor: For best performance, the input tensor should be between 0 and 1. - covs: Covariances of input points. Defaults to None. + covs: Covariances of input points. Returns: Output values will be between -1 and 1 """ @@ -186,7 +186,7 @@ class RFFEncoding(Encoding): Args: in_tensor: For best performance, the input tensor should be between 0 and 1. - covs: Covariances of input points. Defaults to None. + covs: Covariances of input points. Returns: Output values will be between -1 and 1 @@ -212,12 +212,12 @@ class HashEncoding(Encoding): """Hash encoding Args: - num_levels: Number of feature grids. Defaults to 16. - min_res: Resolution of smallest feature grid. Defaults to 16. - max_res: Resolution of largest feature grid. Defaults to 1024. - hash_table_size: Size of hash table. Defaults to 2**19. - features_per_level: Number of features per level. Defaults to 2. - hash_init_scale: Value to initialize hash grid. Defaults to 0.001. + num_levels: Number of feature grids. + min_res: Resolution of smallest feature grid. + max_res: Resolution of largest feature grid. + hash_table_size: Size of hash table. + features_per_level: Number of features per level. + hash_init_scale: Value to initialize hash grid. """ def __init__( @@ -313,9 +313,9 @@ class TensorCPEncoding(Encoding): """Learned CANDECOMP/PARFAC (CP) decomposition encoding used in TensoRF Args: - resolution: Resolution of grid. Defaults to 256. - num_components: Number of components per dimension. Defaults to 24. - init_scale: Initialization scale. Defaults to 0.1. + resolution: Resolution of grid. + num_components: Number of components per dimension. + init_scale: Initialization scale. """ def __init__(self, resolution: int = 256, num_components: int = 24, init_scale: float = 0.1) -> None: @@ -363,9 +363,9 @@ class TensorVMEncoding(Encoding): """Learned vector-matrix encoding proposed by TensoRF Args: - resolution: Resolution of grid. Defaults to 256. - num_components: Number of components per dimension. Defaults to 24. - init_scale: Initialization scale. Defaults to 0.1. + resolution: Resolution of grid. + num_components: Number of components per dimension. + init_scale: Initialization scale. """ plane_coef: TensorType[3, "num_components", "resolution", "resolution"] @@ -427,7 +427,7 @@ class SHEncoding(Encoding): """Spherical harmonic encoding Args: - levels: Number of spherical hamonic levels to encode. Defaults to 4. + levels: Number of spherical hamonic levels to encode. """ def __init__(self, levels: int = 4) -> None: diff --git a/nerfactory/fields/modules/field_heads.py b/nerfactory/fields/modules/field_heads.py index 9f816d2ac..fc25f2272 100644 --- a/nerfactory/fields/modules/field_heads.py +++ b/nerfactory/fields/modules/field_heads.py @@ -117,9 +117,9 @@ class SHFieldHead(FieldHead): Args: in_dim: input dimension. If not defined in constructor, it must be set later. - levels: Number of spherical harmonics layers. Defaults to 3. + levels: Number of spherical harmonics layers. channels: Number of channels. Defaults to 3 (ie RGB). - activation: Output activation. Defaults to None. + activation: Output activation. """ def __init__( diff --git a/nerfactory/fields/modules/mlp.py b/nerfactory/fields/modules/mlp.py index 3af30d012..de7c5dd03 100644 --- a/nerfactory/fields/modules/mlp.py +++ b/nerfactory/fields/modules/mlp.py @@ -31,9 +31,9 @@ class MLP(FieldModule): in_dim: Input layer dimension num_layers: Number of network layers layer_width: Width of each MLP layer - out_dim: Ouput layer dimension. Defaults to layer_width - activation: intermediate layer activation function. Defaults to nn.ReLU. - out_activation: output activation function. Defaults to None. + out_dim: Ouput layer dimension. Uses layer_width if None. + activation: intermediate layer activation function. + out_activation: output activation function. """ def __init__( diff --git a/nerfactory/fields/nerf_field.py b/nerfactory/fields/nerf_field.py index ec0f000c9..48e80c12f 100644 --- a/nerfactory/fields/nerf_field.py +++ b/nerfactory/fields/nerf_field.py @@ -38,15 +38,15 @@ class NeRFField(Field): """NeRF Field Args: - position_encoding: Position encoder. Defaults to Identity(in_dim=3). - direction_encoding: Direction encoder. Defaults to Identity(in_dim=3). - base_mlp_num_layers: Number of layers for base MLP. Defaults to 8. - base_mlp_layer_width: Width of base MLP layers. Defaults to 256. - head_mlp_num_layers: Number of layer for ourput head MLP. Defaults to 2. - head_mlp_layer_width: Width of output head MLP layers. Defaults to 128. - skip_connections: Where to add skip connection in base MLP. Defaults to (4,). - use_integrated_encoding: Used integrated samples as encoding input, Defaults to False. - spatial_distortion: Spatial distortion. Defaults to None. + position_encoding: Position encoder. + direction_encoding: Direction encoder. + base_mlp_num_layers: Number of layers for base MLP. + base_mlp_layer_width: Width of base MLP layers. + head_mlp_num_layers: Number of layer for ourput head MLP. + head_mlp_layer_width: Width of output head MLP layers. + skip_connections: Where to add skip connection in base MLP. + use_integrated_encoding: Used integrated samples as encoding input. + spatial_distortion: Spatial distortion. """ def __init__( diff --git a/nerfactory/fields/nerfw_field.py b/nerfactory/fields/nerfw_field.py index 481977d4e..a33313b1e 100644 --- a/nerfactory/fields/nerfw_field.py +++ b/nerfactory/fields/nerfw_field.py @@ -40,15 +40,15 @@ class VanillaNerfWField(Field): Args: num_images: How many images exist in the dataset. - position_encoding: Position encoder. Defaults to Identity(in_dim=3). - direction_encoding: Direction encoder. Defaults to Identity(in_dim=3). - base_mlp_num_layers: Number of layers for base MLP. Defaults to 8. - base_mlp_layer_width: Width of base MLP layers. Defaults to 256. - head_mlp_num_layers: Number of layer for ourput head MLP. Defaults to 2. - head_mlp_layer_width: Width of output head MLP layers. Defaults to 128. - appearance_embedding_dim:: Dimension of appearance embedding. Defaults to 48. - transient_embedding_dim:: Dimension of transient embedding. Defaults to 16. - skip_connections: Where to add skip connection in base MLP. Defaults to (4,). + position_encoding: Position encoder. + direction_encoding: Direction encoder. + base_mlp_num_layers: Number of layers for base MLP. + base_mlp_layer_width: Width of base MLP layers. + head_mlp_num_layers: Number of layer for ourput head MLP. + head_mlp_layer_width: Width of output head MLP layers. + appearance_embedding_dim:: Dimension of appearance embedding. + transient_embedding_dim:: Dimension of transient embedding. + skip_connections: Where to add skip connection in base MLP. """ def __init__( @@ -121,7 +121,7 @@ class VanillaNerfWField(Field): Args: ray_samples (RaySamples): Ray samples. - density_embedding (TensorType[..., "embedding_size"], optional): Density embedding. Defaults to None. + density_embedding (TensorType[..., "embedding_size"], optional): Density embedding. Returns: Dict[FieldHeadNames, TensorType]: Outputs of the NeRF-W field. diff --git a/nerfactory/fields/semantic_nerf_field.py b/nerfactory/fields/semantic_nerf_field.py index 99edf6e15..b0334c41d 100644 --- a/nerfactory/fields/semantic_nerf_field.py +++ b/nerfactory/fields/semantic_nerf_field.py @@ -38,13 +38,13 @@ class SemanticNerfField(Field): Args: num_semantic_classes: Number of distinct semantic classes. - position_encoding: Position encoder. Defaults to Identity(in_dim=3). - direction_encoding: Direction encoder. Defaults to Identity(in_dim=3). - base_mlp_num_layers: Number of layers for base MLP. Defaults to 8. - base_mlp_layer_width: Width of base MLP layers. Defaults to 256. - head_mlp_num_layers: Number of layer for ourput head MLP. Defaults to 2. - head_mlp_layer_width: Width of output head MLP layers. Defaults to 128. - skip_connections: Where to add skip connection in base MLP. Defaults to (4,). + position_encoding: Position encoder. + direction_encoding: Direction encoder. + base_mlp_num_layers: Number of layers for base MLP. + base_mlp_layer_width: Width of base MLP layers. + head_mlp_num_layers: Number of layer for ourput head MLP. + head_mlp_layer_width: Width of output head MLP layers. + skip_connections: Where to add skip connection in base MLP. """ def __init__( diff --git a/nerfactory/models/modules/ray_sampler.py b/nerfactory/models/modules/ray_sampler.py index 7c3a772fb..9993c9e9d 100644 --- a/nerfactory/models/modules/ray_sampler.py +++ b/nerfactory/models/modules/ray_sampler.py @@ -239,11 +239,11 @@ class PDFSampler(Sampler): Args: num_samples: Number of samples per ray - train_stratified: Randomize location within each bin during training. Defaults to True - include_original: Add original samples to ray. Defaults to True + train_stratified: Randomize location within each bin during training. + include_original: Add original samples to ray. density_field: Density grid. If provides, samples below weight_threshold as set as invalid. weight_threshold: Removes samples below threshold weight. Only used if density field is provided. - histogram_padding: Amount to weights prior to computing PDF. Defaults to 0.01. + histogram_padding: Amount to weights prior to computing PDF. """ def __init__( @@ -276,7 +276,7 @@ class PDFSampler(Sampler): ray_samples: Existing ray samples weights: Weights for each bin num_samples: Number of samples per ray - eps: Small value to prevent numerical issues. Defaults to 1e-5 + eps: Small value to prevent numerical issues. Returns: Positions and deltas for samples along a ray diff --git a/nerfactory/models/nerfw.py b/nerfactory/models/nerfw.py index bbb97775b..73c555c17 100644 --- a/nerfactory/models/nerfw.py +++ b/nerfactory/models/nerfw.py @@ -65,7 +65,6 @@ class NerfWModel(Model): uncertainty_min (float, optional): This is added to the end of the uncertainty rendering operation. It's called 'beta_min' in other repos. This avoids calling torch.log() on a zero value, which would be undefined. - Defaults to 0.03. """ self.field_coarse = None self.field_fine = None diff --git a/nerfactory/optimizers/schedulers.py b/nerfactory/optimizers/schedulers.py index a493a5622..5863195d5 100644 --- a/nerfactory/optimizers/schedulers.py +++ b/nerfactory/optimizers/schedulers.py @@ -29,8 +29,8 @@ class ExponentialDecaySchedule(LambdaLR): lr_init: The initial learning rate. lr_final: The final learning rate. max_steps: The maximum number of steps. - lr_delay_steps: The number of steps to delay the learning rate. Default is 0. - lr_delay_mult: The multiplier for the learning rate after the delay. Default is 1.0. + lr_delay_steps: The number of steps to delay the learning rate. + lr_delay_mult: The multiplier for the learning rate after the delay. """ def __init__(self, optimizer, lr_init, lr_final, max_steps, lr_delay_steps=0, lr_delay_mult=1.0) -> None: diff --git a/nerfactory/renderers/renderers.py b/nerfactory/renderers/renderers.py index fa9d7a3b1..67b6a6e69 100644 --- a/nerfactory/renderers/renderers.py +++ b/nerfactory/renderers/renderers.py @@ -27,7 +27,7 @@ Example: """ import math -from typing import Optional +from typing import Literal, Optional import nerfacc import torch @@ -42,7 +42,7 @@ class RGBRenderer(nn.Module): """Standard volumetic rendering. Args: - background_color: Background color as RGB. Defaults to random. + background_color: Background color as RGB. Uses random colors if None. """ def __init__(self, background_color: Optional[TensorType[3]] = None) -> None: @@ -63,7 +63,7 @@ class RGBRenderer(nn.Module): Args: rgb: RGB for each sample weights: Weights for each sample - background_color: Background color as RGB. Defaults to random. + background_color: Background color as RGB. Uses random colors if None. ray_indices: Ray index for each sample, used when samples are packed. num_rays: Number of rays, used when samples are packed. @@ -115,8 +115,8 @@ class SHRenderer(nn.Module): """Render RGB value from spherical harmonics. Args: - background_color: Background color as RGB. Defaults to random. - activation: Output activation. Defaults to Sigmoid(). + background_color: Background color as RGB. Uses random colors if None + activation: Output activation. """ def __init__( @@ -191,13 +191,11 @@ class DepthRenderer(nn.Module): """Calculate depth along ray. Args: - method (str, optional): Depth calculation method. Defaults to 'expected'. + method (str, optional): Depth calculation method. """ - def __init__(self, method: str = "expected") -> None: + def __init__(self, method: Literal["expected"] = "expected") -> None: super().__init__() - if method not in {"expected"}: - raise ValueError(f"{method} is an invalid depth calculation method") self.method = method def forward( diff --git a/nerfactory/utils/io.py b/nerfactory/utils/io.py index c6e5d4882..9681ab9b2 100644 --- a/nerfactory/utils/io.py +++ b/nerfactory/utils/io.py @@ -75,7 +75,7 @@ def get_git_root(path: str, dirs: Tuple[str] = (".git",), default: str = "") -> Args: path: The path to start from. - dirs: The directories to look for. Defaults to (".git",). + dirs: The directories to look for. default: The default value to return if no git root is found. Returns: diff --git a/nerfactory/utils/visualization.py b/nerfactory/utils/visualization.py index fcaa777cc..3e44e22e0 100644 --- a/nerfactory/utils/visualization.py +++ b/nerfactory/utils/visualization.py @@ -28,7 +28,7 @@ def apply_colormap(image: TensorType["bs":..., 1], cmap="viridis") -> TensorType Args: image: Single channel image. - cmap: Colormap for image. Defaults to 'turbo'. + cmap: Colormap for image. Returns: TensorType: Colored image @@ -55,10 +55,10 @@ def apply_depth_colormap( Args: depth: Depth image. - accumulation: Ray accumulation used for masking vis. Defaults to None. - near_plane: Closest depth to consider. If None, use min image value. Defaults to None. - far_plane: Furthest depth to consider. If None, use max image value. Defaults to None. - cmap: Colormap to apply. Defaults to "turbo". + accumulation: Ray accumulation used for masking vis. + near_plane: Closest depth to consider. If None, use min image value. + far_plane: Furthest depth to consider. If None, use max image value. + cmap: Colormap to apply. Returns: Colored depth image @@ -88,8 +88,8 @@ def apply_boolean_colormap( Args: image: Boolean image. - true_color: Color to use for True. Defaults to white. - false_color: Color to use for False. Defaults to black. + true_color: Color to use for True. + false_color: Color to use for False. Returns: Colored boolean image diff --git a/nerfactory/viewer/server/subprocess.py b/nerfactory/viewer/server/subprocess.py index f7ddeb384..276db33d9 100644 --- a/nerfactory/viewer/server/subprocess.py +++ b/nerfactory/viewer/server/subprocess.py @@ -38,7 +38,7 @@ def run_viewer_bridge_server_as_subprocess(zmq_port: int, websocket_port: int, l Args: zmq_port: Port to use for the ZMQ server. websocket_port: Port to use for the websocket server. - log_filename: Filename to use for the log file. Defaults to None. If None, no log file is created. + log_filename: Filename to use for the log file. If None, no log file is created. Returns: None diff --git a/nerfactory/viewer/server/visualizer.py b/nerfactory/viewer/server/visualizer.py index dced16d8a..dfec24caa 100644 --- a/nerfactory/viewer/server/visualizer.py +++ b/nerfactory/viewer/server/visualizer.py @@ -90,8 +90,8 @@ class Viewer: """Viewer class for connecting to the bridge server. Args: - zmq_url: Where to connect with ZMQ. Defaults to None. - window: An already existing ViewerWindow. Defaults to None. + zmq_url: Where to connect with ZMQ. + window: An already existing ViewerWindow. """ def __init__(self, zmq_url: Optional[str] = None, window: Optional[ViewerWindow] = None): diff --git a/scripts/debugging/run_actions.py b/scripts/debugging/run_actions.py index 9e28e9762..67421ddc1 100755 --- a/scripts/debugging/run_actions.py +++ b/scripts/debugging/run_actions.py @@ -18,7 +18,7 @@ def run_command(command: str, continue_on_fail: bool = False) -> bool: Args: command: command to run - continue_on_fail: whether to continue running commands if the current one fails. Defaults to False. + continue_on_fail: whether to continue running commands if the current one fails. """ ret_code = subprocess.call(command, shell=True) if ret_code != 0: diff --git a/scripts/run_eval.py b/scripts/run_eval.py index effc1509f..920ef90bf 100755 --- a/scripts/run_eval.py +++ b/scripts/run_eval.py @@ -110,8 +110,7 @@ def _render_trajectory_video( output_filename: Name of the output file. rendered_output_name: Name of the renderer output to use. rendered_resolution_scaling_factor: Scaling factor to apply to the camera image resolution. - Defaults to 1.0. - seconds: Number for the output video. Defaults to 5.0. + seconds: Number for the output video. """ console.print("[bold green]Creating trajectory video") images = [] diff --git a/scripts/run_train.py b/scripts/run_train.py index 783e979ed..f59c6a5cc 100755 --- a/scripts/run_train.py +++ b/scripts/run_train.py @@ -126,10 +126,10 @@ def launch( main_func (Callable): function that will be called by the distributed workers num_gpus_per_machine (int): number of GPUs per machine num_machines (int, optional): total number of machines - machine_rank (int, optional): rank of this machine. Defaults to 0. - dist_url (str, optional): url to connect to for distributed jobs. Defaults to "auto". - config (Config, optional): config file specifying training regimen. Defaults to None. - timeout (timedelta, optional): timeout of the distributed workers. Defaults to DEFAULT_TIMEOUT. + machine_rank (int, optional): rank of this machine. + dist_url (str, optional): url to connect to for distributed jobs. + config (Config, optional): config file specifying training regimen. + timeout (timedelta, optional): timeout of the distributed workers. """ assert config is not None world_size = num_machines * num_gpus_per_machine