Commit b6efc047 authored by Ajinkya Deogade's avatar Ajinkya Deogade Committed by Facebook GitHub Bot
Browse files

Trainer except lightning: create a separate buck target

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

The TARGETS for the files inside the directory `trainer` are tackled in two parts.
1. This diff creates TARGETS for the files inside `trainer` i.e. except `trainer/lightning`
2. The diff D46096373 creates TARGETS for files inside `trainer/lightning`

Reviewed By: tglik, wat3rBro

Differential Revision: D45912069

fbshipit-source-id: 3026250a49978f1b8e7a48aeebe1914d8a0a692b
parent 363dffb1
......@@ -9,7 +9,7 @@ from typing import Callable, Generator, Iterable, Optional
import torch
import torch.nn as nn
from d2go.config import CfgNode as CN
from d2go.modeling import modeling_hook as mh
from d2go.modeling.modeling_hook import ModelingHook
from d2go.registry.builtin import MODELING_HOOK_REGISTRY
from d2go.trainer.helper import parse_precision_from_string
from detectron2.utils.registry import Registry
......@@ -265,7 +265,7 @@ def build_fsdp(
@MODELING_HOOK_REGISTRY.register()
class FSDPModelingHook(mh.ModelingHook):
class FSDPModelingHook(ModelingHook):
"""Modeling hook that wraps model in FSDP based on config"""
def apply(self, model: nn.Module) -> FSDPWrapper:
......
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