File tree Expand file tree Collapse file tree 10 files changed +29
-22
lines changed
Expand file tree Collapse file tree 10 files changed +29
-22
lines changed Original file line number Diff line number Diff line change 11---
22name : " \U0001F4DA Documentation Issues"
3- about : Issues or enhancements about docs and comments
3+ about : Docs and comments are missing, incorrect, or not clear enough
44labels : documentation
55
66---
Original file line number Diff line number Diff line change 2929 core.debug("Issue " + issue.data.title + " was skipped.");
3030 return;
3131 }
32- const body = issue.data.body;
33- const hasInstructions = body.toLowerCase(). indexOf("reproduce") != -1;
34- const hasEnvironment = body.indexOf("sys.platform") != -1;
32+ const body = issue.data.body.toLowerCase() ;
33+ const hasInstructions = body.indexOf("reproduce") != -1;
34+ const hasEnvironment = ( body.indexOf("sys.platform") != -1) || (body.indexOf("colab") != -1) ;
3535 if (hasInstructions && hasEnvironment) {
3636 core.debug("Issue " + issue.data.title + " follows template.");
3737 return;
Original file line number Diff line number Diff line change @@ -255,17 +255,13 @@ def _write_metrics(
255255 loss_dict (dict): dict of scalar losses
256256 data_time (float): time taken by the dataloader iteration
257257 """
258- device = next (iter (loss_dict .values ())).device
258+ metrics_dict = {k : v .detach ().cpu ().item () for k , v in loss_dict .items ()}
259+ metrics_dict ["data_time" ] = data_time
259260
260- # Use a new stream so these ops don't wait for DDP or backward
261- with torch .cuda .stream (torch .cuda .Stream () if device .type == "cuda" else None ):
262- metrics_dict = {k : v .detach ().cpu ().item () for k , v in loss_dict .items ()}
263- metrics_dict ["data_time" ] = data_time
264-
265- # Gather metrics among all workers for logging
266- # This assumes we do DDP-style training, which is currently the only
267- # supported method in detectron2.
268- all_metrics_dict = comm .gather (metrics_dict )
261+ # Gather metrics among all workers for logging
262+ # This assumes we do DDP-style training, which is currently the only
263+ # supported method in detectron2.
264+ all_metrics_dict = comm .gather (metrics_dict )
269265
270266 if comm .is_main_process ():
271267 storage = get_event_storage ()
Original file line number Diff line number Diff line change @@ -345,6 +345,7 @@ class Res5ROIHeads(ROIHeads):
345345 The ROIHeads in a typical "C4" R-CNN model, where
346346 the box and mask head share the cropping and
347347 the per-region feature computation by a Res5 block.
348+ See :paper:`ResNet` Appendix A.
348349 """
349350
350351 @configurable
Original file line number Diff line number Diff line change @@ -187,5 +187,8 @@ def collect_env_info():
187187 try :
188188 x = torch .tensor ([1 , 2.0 ], dtype = torch .float32 )
189189 x = x .to (device )
190- except Exception :
191- print (f"Unable to copy tensor to device={ device } " )
190+ except Exception as e :
191+ print (
192+ f"Unable to copy tensor to device={ device } : { e } . "
193+ "Your CUDA environment is broken."
194+ )
Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ def locate(name: str) -> Any:
3333 # Should use _locate directly if it's public.
3434 if obj is None :
3535 try :
36- from hydra ._internal . utils import _locate
36+ from hydra .utils import get_method
3737 except ImportError as e :
3838 raise ImportError (f"Cannot dynamically locate object { name } !" ) from e
3939 else :
40- obj = _locate (name ) # it raises if fails
40+ obj = get_method (name ) # it raises if fails
4141
4242 return obj
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ cd docker && USER_ID=$UID docker-compose run detectron2
2525After building the base detectron2 container as above, do:
2626```
2727# Build:
28- docker build -t detectron2-deploy:v0 -f deploy.Dockerfile
28+ docker build -t detectron2-deploy:v0 -f deploy.Dockerfile .
2929# Launch:
3030docker run --gpus all -it detectron2-deploy:v0
3131```
Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ Detectron2 depends on utilities in
55`fvcore <https://github.com/facebookresearch/fvcore/ >`_.
66We include part of fvcore documentation here for easier reference.
77
8- fvcore.nn
8+ fvcore.nn
99-----------------
1010
1111.. automodule :: fvcore.nn
1212 :members:
1313 :undoc-members:
1414 :show-inheritance:
1515
16- fvcore.common
16+ fvcore.common
1717---------------------
1818
1919.. automodule :: fvcore.common.checkpoint
@@ -31,6 +31,11 @@ fvcore.common
3131 :undoc-members:
3232 :show-inheritance:
3333
34+ .. automodule :: fvcore.common.param_scheduler
35+ :members:
36+ :undoc-members:
37+ :show-inheritance:
38+
3439.. automodule :: fvcore.common.registry
3540 :members:
3641 :undoc-members:
Original file line number Diff line number Diff line change 2525from detectron2 .modeling import build_model
2626from detectron2 .solver import build_optimizer
2727from detectron2 .utils import comm
28+ from detectron2 .utils .collect_env import collect_env_info
2829from detectron2 .utils .events import CommonMetricPrinter
2930from detectron2 .utils .logger import setup_logger
3031
@@ -154,6 +155,7 @@ def f():
154155 args = parser .parse_args ()
155156 assert not args .eval_only
156157
158+ logger .info ("Environment info:\n " + collect_env_info ())
157159 if args .task == "data" :
158160 f = benchmark_data
159161 print ("Initial " + RAM_msg ())
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ This directory contains the following examples:
1212All C++ examples depend on libtorch and OpenCV. Some require more dependencies:
1313
1414* Running caffe2-format models requires:
15- * PyTorch with caffe2 inside
15+ * libtorch built with caffe2 inside
1616 * gflags, glog
1717 * protobuf library that matches the version used by PyTorch (version defined in ` include/caffe2/proto/caffe2.pb.h ` of your PyTorch installation)
1818 * MKL headers if caffe2 is built with MKL
You can’t perform that action at this time.
0 commit comments