mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-29 04:20:10 +08:00
Serializing JSON code for drawable objects (and some documentation) (#222)
* some comments and starting serializing comments. on plane w/o formatter * fixing pylint and black * removed changes in file * revert file * addressing comments * remove abstract Co-authored-by: Ethan Weber <ethanweber@Ethans-MacBook-Pro.local>
This commit is contained in:
1 parent
44a7fa288c
commit
d13a766b9e
13 files changed
+240
-106
No files matched your search
@@ -13,16 +13,26 @@
|
||||
# limitations under the License.
|
||||
|
||||
"""
|
||||
Callback functions for training iterations
|
||||
Callback code used for training iterations
|
||||
"""
|
||||
|
||||
from typing import Callable
|
||||
|
||||
|
||||
class Callback:
|
||||
"""Callback Object"""
|
||||
"""Callback class used during training.
|
||||
The function 'func' with 'args' and 'kwargs' will be called every 'update_every_num_iters' training iterations,
|
||||
including at iteration 0.
|
||||
|
||||
Args:
|
||||
update_every_num_iters: How often to call the function `func`.
|
||||
func: The function that will be called.
|
||||
args: args for the function 'func'.
|
||||
kwargs: kwargs for the function 'func'.
|
||||
"""
|
||||
|
||||
def __init__(self, update_every_num_iters: int, func: Callable, *args, **kwargs):
|
||||
# TODO(ethan): how do we type args and kwargs?
|
||||
self.update_every_num_iters = update_every_num_iters
|
||||
self.func = func
|
||||
self.args = args
|
||||
|
||||
Reference in new issue
Block a user