jina.helloworld.fashion.helper module

jina.helloworld.fashion.helper.get_groundtruths(target, pseudo_match=False)[source]

jina.helloworld.fashion.helper.index_generator(num_docs, target)[source]

Generate the index data.

  • Parameters

    • num_docs (int) – Number of documents to be indexed.

    • target (dict) – Dictionary which stores the data paths

    Yields

    index data

jina.helloworld.fashion.helper.query_generator(num_docs, target)[source]

Generate the query data.

  • Parameters

    • num_docs (int) – Number of documents to be queried

    • target (dict) – Dictionary which stores the data paths

    Yields

    query data

jina.helloworld.fashion.helper.print_result(groundtruths, resp)[source]

jina.helloworld.fashion.helper.write_html(html_path)[source]

Method to present results in browser.

  • Parameters

    html_path – path of the written html

jina.helloworld.fashion.helper.download_data(targets, download_proxy=None, task_name=’download fashion-mnist’)[source]

Download data.

  • Parameters

    • targets – target path for data.

    • download_proxy – download proxy (e.g. ‘http’, ‘https’)

    • task_name – name of the task

jina.helloworld.fashion.helper.load_mnist(path)[source]

Load MNIST data

  • Parameters

    path – path of data

    Returns

    MNIST data in np.array

jina.helloworld.fashion.helper.load_labels(path)[source]

Load labels from path

  • Parameters

    path (str) – path of labels

    Returns

    labels in np.array