mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 21:39:06 +08:00
Allow methods configs to be discovered from external packages. (#1357)
* Allow method_config to be registered from external packages * Add license * Add MethodSpecification class + fix linter errors ---------
This commit is contained in:
1 parent
bf64769128
commit
59f71eda0e
7 files changed
+183
No files matched your search
@@ -57,6 +57,7 @@ from nerfstudio.models.tensorf import TensoRFModelConfig
|
||||
from nerfstudio.models.vanilla_nerf import NeRFModel, VanillaModelConfig
|
||||
from nerfstudio.pipelines.base_pipeline import VanillaPipelineConfig
|
||||
from nerfstudio.pipelines.dynamic_batch import DynamicBatchPipelineConfig
|
||||
from nerfstudio.plugins.registry import discover_methods
|
||||
|
||||
method_configs: Dict[str, TrainerConfig] = {}
|
||||
descriptions = {
|
||||
@@ -387,6 +388,10 @@ method_configs["nerfplayer-ngp"] = TrainerConfig(
|
||||
vis="viewer",
|
||||
)
|
||||
|
||||
external_methods, external_descriptions = discover_methods()
|
||||
method_configs.update(external_methods)
|
||||
descriptions.update(external_descriptions)
|
||||
|
||||
AnnotatedBaseConfigUnion = tyro.conf.SuppressFixed[ # Don't show unparseable (fixed) arguments in helptext.
|
||||
tyro.conf.FlagConversionOff[
|
||||
tyro.extras.subcommand_type_from_defaults(defaults=method_configs, descriptions=descriptions)
|
||||
|
||||
Reference in new issue
Block a user