now.utils module#

now.utils.get_device()[source]#
now.utils.save_before_after_image(path)[source]#
now.utils.visual_result(data, querys, output=None, canvas_size=1500, channel_axis=- 1, img_per_row=11, label='finetuner_label', unique=False)[source]#
now.utils.plot_metrics(metrics_dict, title)[source]#
now.utils.custom_spinner()[source]#
now.utils.download_file(path, r_raw)[source]#
now.utils.download(url, filename)[source]#
now.utils.get_rich_console()[source]#

Function to get jina rich default console. :return: rich console

now.utils.copytree(src, dst, symlinks=False, ignore=None)[source]#
now.utils.my_handler(signum, frame, spinner)[source]#
now.utils.flow_definition(dirpath)[source]#
Return type

Dict

class now.utils.BetterEnum[source]#

Bases: object

now.utils.to_camel_case(text)[source]#

Convert text to camel case in great coding style

now.utils.write_env_file(env_file, config)[source]#
now.utils.jina_auth_login()[source]#
now.utils.get_info_hubble(user_input)[source]#
now.utils.print_headline()[source]#
now.utils.maybe_prompt_user(questions, attribute, **kwargs)[source]#

Checks the kwargs for the attribute name. If present, the value is returned directly. If not, the user is prompted via the cmd-line using the questions argument.

Parameters
Returns

A single value of either from kwargs or the user cli input.

now.utils.flatten_dict(d, parent_key='', sep='_')[source]#