From 15ec1f036b439bb96bec326ac8e4302315e3cec8 Mon Sep 17 00:00:00 2001 From: Michael Gschwind Date: Mon, 8 Mar 2021 09:17:39 -0800 Subject: [PATCH] Add nop_decorator Summary: Add nop_decorator Differential Revision: D26886664 fbshipit-source-id: 0fc2c490eefa7d38b8a4a7d14ec829a221ede5a7 --- pytext/task/nop_decorator.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pytext/task/nop_decorator.py diff --git a/pytext/task/nop_decorator.py b/pytext/task/nop_decorator.py new file mode 100644 index 000000000..ce4b24ed4 --- /dev/null +++ b/pytext/task/nop_decorator.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 +# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reservedimport functools + +import functools + +# module decorator for specifying acceleration +class accelerator: + def __init__(self, specs, inputs_function=None): + pass + + def __call__(self, module): + @functools.wraps(module) + def wrapper(*args, **kwargs): + return module(*args, **kwargs) + + return wrapper + + @classmethod + def _dfs_modules(cls, node, backend, results, submod_path=""): + pass + + @classmethod + def get_modules(cls, model, backend): + pass + + @classmethod + def get_module_from_path(cls, model, prefixes): + pass + + @classmethod + def get_embedding_module_from_path(cls, model, submod_path): + pass