• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

georgia-tech-db / eva / #758

04 Sep 2023 08:37PM UTC coverage: 0.0% (-78.3%) from 78.333%
#758

push

circle-ci

hershd23
Increased underline length in at line 75 in text_summarization.rst
	modified:   docs/source/benchmarks/text_summarization.rst

0 of 11303 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/evadb/udfs/decorators/decorators.py
1
# coding=utf-8
2
# Copyright 2018-2023 EvaDB
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
7
#
8
#     http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15

16

17
from typing import List
×
18

19
from evadb.udfs.decorators.io_descriptors.abstract_types import IOArgument
×
20

21

22
def setup(cacheable: bool = False, udf_type: str = "Abstract", batchable: bool = True):
×
23
    """decorator for the setup function. It will be used to set the cache, batching and
24
    udf_type parameters in the catalog
25

26
    Args:
27
        use_cache (bool): True if the udf should be cached
28
        udf_type (str): Type of the udf
29
        batch (bool): True if the udf should be batched
30
    """
31

32
    def inner_fn(arg_fn):
×
33
        def wrapper(*args, **kwargs):
×
34
            # calling the setup function defined by the user inside the udf implementation
35
            arg_fn(*args, **kwargs)
×
36

37
        tags = {}
×
38
        tags["cacheable"] = cacheable
×
39
        tags["udf_type"] = udf_type
×
40
        tags["batchable"] = batchable
×
41
        wrapper.tags = tags
×
42
        return wrapper
×
43

44
    return inner_fn
×
45

46

47
def forward(input_signatures: List[IOArgument], output_signatures: List[IOArgument]):
×
48
    """decorator for the forward function. It will be used to set the input and output.
49

50
    Args:
51
        input_signature (List[IOArgument]): List of input arguments for the udf
52
        output_signature ( List[IOArgument])): List of output arguments for the udf
53
    """
54

55
    def inner_fn(arg_fn):
×
56
        def wrapper(*args):
×
57
            # calling the forward function defined by the user inside the udf implementation
58
            return arg_fn(*args)
×
59

60
        tags = {}
×
61
        tags["input"] = input_signatures
×
62
        tags["output"] = output_signatures
×
63
        wrapper.tags = tags
×
64
        return wrapper
×
65

66
    return inner_fn
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc