Model: TakalaWang/qwen3-embedding-4B-code-search
Author: TakalaWang
Pipeline: sentence-similarity
Library: sentence-transformers
Tags: sentence-transformers, safetensors, qwen3, sentence-similarity, feature-extraction, dense, generated_from_trainer, dataset_size:800, loss:ContrastiveLoss, arxiv:1908.10084, base_model:Qwen/Qwen3-Embedding-4B, base_model:finetune:Qwen/Qwen3-Embedding-4B, endpoints_compatible, region:us
Base models (finetune): id: Qwen/Qwen3-Embedding-4B
Card metadata: tags: sentence-transformers, sentence-similarity, feature-extraction, dense, generated_from_trainer, dataset_size:800, loss:ContrastiveLoss
base_model: Qwen/Qwen3-Embedding-4B
widget: source_sentence: Collects the tracing data from the given parameters.
        :param request: The Flask request.
        :param response: The flask response.
        :param error: The error occurred if any.
        :param latency: The time elapsed to process the request.
        :return: The tracing data.
sentences: def enum_to_yaml(cls: Type[T_EnumToYAML], representer: Representer, data: T_EnumToYAML) -> ruamel.yaml.nodes.ScalarNode:
    
    return representer.represent_scalar(
        f"!{cls.__name__}",
        f"{str(data)}"
    ), def subclasses(self, inherited=False):
        
        data = clips.data.DataObject(self._env)

        lib.EnvClassSubclasses(self._env, self._cls, data.byref, int(inherited))

        for klass in classes(self._env, data.value):
            yield klass, def identify(self, req, resp, resource, uri_kwargs):
        
        header = req.get_header(, False)
        auth = header.split() if header else None

        if auth is None or auth[0].lower() != :
            return None

        if len(auth) != 2:
            raise HTTPBadRequest(
                "Invalid Authorization header",
                "The Authorization header for Token auth should be in form:\n"
                "Authorization: Token <token_value>"
            )

        return auth[1], source_sentence: A wrapper for `os.walk` that skips hidden files and directories.

    This function does not have the parameter `topdown` from
    `os.walk`: the directories must always be recursed top-down when
    using this function.

    See also
    --------
    os.walk : For a description of the parameters
sentences: def expand_all(self):
        

        def aux(item):
            self.item(item, open=True)
            children = self.get_children(item)
            for c in children:
                aux(c)

        children = self.get_children("")
        for c in children:
            aux(c), def create_extended_model(model, db_penalty=None, ex_penalty=None,
                          tp_penalty=None, penalties=None):
    

    
    model_extended = model.create_metabolic_model()
    extra_compartment = model.extracellular_compartment

    compartment_ids = set(c.id for c in model.compartments)

    
    if len(compartment_ids) > 0:
        logger.info(
            .format(
                .join(.format(c) for c in compartment_ids)))
        db_added = add_all_database_reactions(model_extended, compartment_ids)
    else:
        logger.warning(
            
            
            )
        db_added = set()

    
    logger.info(
        .format(
            extra_compartment))
    ex_added = add_all_exchange_reactions(
        model_extended, extra_compartment, allow_duplicates=True)

    
    boundaries = model.compartment_boundaries
    if len(boundaries) > 0:
        logger.info(
            
            .format(
                .join(.format(c1, c2) for c1, c2 in boundaries)))
        tp_added = add_all_transport_reactions(
            model_extended, boundaries, allow_duplicates=True)
    else:
        logger.warning(
            
            )
        tp_added = set()

    
    weights = {}
    if db_penalty is not None:
        weights.update((rxnid, db_penalty) for rxnid in db_added)
    if tp_penalty is not None:
        weights.update((rxnid, tp_penalty) for rxnid in tp_added)
    if ex_penalty is not None:
        weights.update((rxnid, ex_penalty) for rxnid in ex_added)

    if penalties is not None:
        for rxnid, penalty in iteritems(penalties):
            weights[rxnid] = penalty
    return model_extended, weights, def walk_skip_hidden(top, onerror=None, followlinks=False):
    

    for root, dirs, files in os.walk(
            top, topdown=True, onerror=onerror,
            followlinks=followlinks):
        
        
        dirs[:] = [d for d in dirs if not is_path_hidden(d)]
        files[:] = [f for f in files if not is_path_hidden(f)]
        yield root, dirs, files, source_sentence: Show stack frames for a task
sentences: def do_where(self, taskid: int) -> None:
        
        task = task_by_id(taskid, self._loop)
        if task:
            self._sout.write(_format_stack(task))
            self._sout.write()
        else:
            self._sout.write( % taskid), def apt_add_repository_from_apt_string(apt_string, apt_file):
    

    apt_file_path =  % apt_file

    if not file_contains(apt_file_path, apt_string.lower(), use_sudo=True):
        file_append(apt_file_path, apt_string.lower(), use_sudo=True)

        with hide(, ):
            sudo("DEBIAN_FRONTEND=noninteractive apt-get update"), def _kl_laplace_laplace(a, b, name=None):
  
  with tf.name_scope(name or "kl_laplace_laplace"):
    
    
    distance = tf.abs(a.loc - b.loc)
    ratio = a.scale / b.scale

    return (-tf.math.log(ratio) - 1 + distance / b.scale +
            ratio * tf.exp(-distance / a.scale)), source_sentence: Read the ical file
sentences: def read_ical(self, ical_file_location):  
        
        with open(ical_file_location, ) as ical_file:
            data = ical_file.read()
        self.cal = Calendar.from_ical(data)
        return self.cal, def _size_from_header(cls, header):
        

        
        result = []

        for data in header:
            

            
            result.append(header[data])

        
        return result, def dockermachine_ip() -> Optional[str]:
    
    if not check_dockermachine():
        return None

    
    try:
        out = subprocess.check_output([, ])
        return out.decode("utf-8").strip()
    except Exception:
        logger.debug(f"docker machine not present")
        return None, source_sentence: list[VolumeExtent]: sections.
sentences: def cast_to_a1_notation(method):
    
    @wraps(method)
    def wrapper(self, *args, **kwargs):
        try:
            if len(args):
                int(args[0])

            
            range_start = rowcol_to_a1(*args[:2])
            range_end = rowcol_to_a1(*args[-2:])
            range_name = .join((range_start, range_end))

            args = (range_name,) + args[4:]
        except ValueError:
            pass

        return method(self, *args, **kwargs)

    return wrapper, def readfmt(self, fmt):
        
        size = struct.calcsize(fmt)
        blob = self.read(size)
        obj, = struct.unpack(fmt, blob)
        return obj, def equals(self, other):
        
        self._run(unittest_case.assertEqual, (self._subject, other))
        return ChainInspector(self._subject)
pipeline_tag: sentence-similarity
library_name: sentence-transformers
Likes: 1 | All-time downloads: 66
Created: 2025-09-30 14:59:19