common

virtualitics_sdk.nlp.common.base_stats2infographics(kg_stats, as_dict=False)
virtualitics_sdk.nlp.common.build_default_page(store_interface, title, descr)
virtualitics_sdk.nlp.common.build_kg_dashboard(kg, img_obj, graph_statistics=None, latest_louvain=False, df_columns=None, advanced=False, return_topk_communities=False)
virtualitics_sdk.nlp.common.compute_topk_communities(kg, community_attr='Segments', topk=15)
virtualitics_sdk.nlp.common.crop_plot(img, plot_margin_default_top=50, plot_margin_default_side=50)
virtualitics_sdk.nlp.common.get_assets_info(store_interface, asset_type)

Responsible for generating asset names that are related to a specific flow execution. It will create the asset name using joining info like the flow id and the type of asset you’re interested in.

Parameters:
  • store_interface (StoreInterface) – The StoreInterface to pass metadata about the flow execution environment.

  • asset_type (AssetType) – AssetType enum value (one between NLPROCESSOR, KNOWLEDGE_GRAPH, EXPLAINER)

  • as_dict – Whether the function should return just the asset name or the whole dict for later retrieving the asset

Return type:

Dict

Returns:

str that represent the asset name or a dict that can be passed for retrieving the asset store_interface.get_asset(**asset_info)

virtualitics_sdk.nlp.common.topk_stats2infographics(kg_stats, topk=16)