Skip to content

Commit e3ec1f5

Browse files
committed
Added dynamic loading of plotting module
1 parent 96d2c06 commit e3ec1f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rhtorch/torch_training.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import argparse
1313

1414
# library package imports
15+
import rhtorch
1516
from rhtorch.callbacks import plotting
1617
from rhtorch.utilities.config import UserConfig
1718
from rhtorch.utilities.modules import recursive_find_python_class
@@ -111,7 +112,7 @@ def main():
111112
callbacks = []
112113
if 'plotting_callback' in configs:
113114
plot_configs = configs['plotting_callback']
114-
plotting_callback = getattr(plotting, plot_configs['class'])
115+
plotting_callback = recursive_find_python_class(plot_configs['class'], current_module='rhtorch.callbacks')
115116
callbacks.append(plotting_callback(model, data_module, configs))
116117

117118
# checkpointing

0 commit comments

Comments
 (0)