Commit 80d3844b authored by Mircea Cimpoi's avatar Mircea Cimpoi Committed by Facebook GitHub Bot
Browse files

Make model_configs optional

Summary:
Pull Request resolved: https://github.com/facebookresearch/d2go/pull/349

This is to allow None, meaning model_configs is not used.

Added tasks for the other TODO.

Reviewed By: wat3rBro

Differential Revision: D38199075

fbshipit-source-id: 774ca42a82a972b7e4c642cc4306aec39e2c2f7f
parent 482fdc8a
...@@ -32,13 +32,15 @@ from detectron2.engine.defaults import create_ddp_model ...@@ -32,13 +32,15 @@ from detectron2.engine.defaults import create_ddp_model
logger = logging.getLogger("d2go.tools.train_net") logger = logging.getLogger("d2go.tools.train_net")
# TODO (T127368935) Split to TrainNetOutput and TestNetOutput
@dataclass @dataclass
class TrainNetOutput: class TrainNetOutput:
accuracy: AccuracyDict[float] accuracy: AccuracyDict[float]
metrics: MetricsDict[float] metrics: MetricsDict[float]
model_configs: Dict[str, str] # Optional, because we use None to distinguish "not used" from
# TODO: decide if `tensorboard_log_dir` should be part of output # empty model configs. With T127368935, this should be reverted to dict.
model_configs: Optional[Dict[str, str]]
# TODO (T127368603): decide if `tensorboard_log_dir` should be part of output
tensorboard_log_dir: Optional[str] = None tensorboard_log_dir: Optional[str] = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment