Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
And One More Question. How Can I Get Loaded Model In Preporcess Class In Clearml Serving?


AgitatedDove14 My model has method generate. i would like to call it. How can i get loaded automaticly model from Preprocess object. Preprocess file
` from typing import Any, Callable, Optional

from transformers import TrOCRProcessor
import numpy as np

Notice Preprocess class Must be named "Preprocess"

class Preprocess(object):

def __init__(self):
    self.processor = TrOCRProcessor.from_pretrained("microsoft/trocr-small-printed")      

def preprocess(self, body: dict, state: dict, collect_custom_statistics_fn=None) -> Any:
    return self.processor.batch_decode(np.array(body.get("image")))

def process(
        self,
        data: Any,
        state: dict,
        collect_custom_statistics_fn: Optional[Callable[[dict], None]],
) -> Any: 
    model = #get model
    data = model.generate(data.pixel_values)
    return data

def postprocess(self, data: Any, state: dict, collect_custom_statistics_fn=None) -> dict:
    return dict(predict=data.tolist()) `I trained model and log it to ClearML Server. I try to add it to ClearML Serving, but it call  ` forward `  method by default
  
  
Posted 2 years ago
186 Views
0 Answers
2 years ago
one year ago