Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NERFSTUDIO_METHOD_CONFIGS callable MethodSpecification #2385

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

drewgilliam
Copy link
Contributor

Allow NERFSTUDIO_METHOD_CONFIGS environment variable to reference callable MethodSpecification such as a function or class. Allowable references would now include:

  • MethodSpecification instance (current functionality)
  • a function that returns a MethodSpecification instance
  • a derived class of MethodSpecification

This allows the custom model instantiation to be delayed until registration, rather than requiring instantiation immediately on import of the python module containing the model.

@tancik
Copy link
Contributor

tancik commented Aug 31, 2023

This looks nice. Whats missing now is a way to let users know about this functionality, at the moment it is quite buried. Any ideas on a good place in the docs to add it?

@drewgilliam
Copy link
Contributor Author

Does extending new_methods docs to note compatibility of NERFSTUDIO_METHOD_CONFIGS with a function or derived class work?

@tancik
Copy link
Contributor

tancik commented Sep 1, 2023

Does extending new_methods docs to note compatibility of NERFSTUDIO_METHOD_CONFIGS with a function or derived class work?

Yep! sounds good.

@drewgilliam
Copy link
Contributor Author

@tancik - docs added

Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tancik tancik merged commit 4d00333 into nerfstudio-project:main Sep 5, 2023
4 checks passed
@drewgilliam drewgilliam deleted the method_spec branch September 5, 2023 21:16
maturk pushed a commit that referenced this pull request Sep 11, 2023
* NERFSTUDIO_METHOD_CONFIGS allow method specification as callabale (function or class)

* docs - NERFSTUDIO_METHOD_CONFIGS accepts function or derived class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants