diff --git a/level_3/.data/dssd.pdf b/level_3/.data/dssd.pdf new file mode 100644 index 000000000..e610a35c0 Binary files /dev/null and b/level_3/.data/dssd.pdf differ diff --git a/level_3/models/operation.py b/level_3/models/operation.py index 3c3877286..595745b15 100644 --- a/level_3/models/operation.py +++ b/level_3/models/operation.py @@ -15,6 +15,7 @@ class Operation(Base): user_id = Column(String, ForeignKey('users.id'), index=True) # Link to User operation_type = Column(String, nullable=True) operation_params = Column(String, nullable=True) + number_of_files = Column(Integer, nullable=True) test_set_id = Column(String, ForeignKey('test_sets.id'), index=True) created_at = Column(DateTime, default=datetime.utcnow) updated_at = Column(DateTime, onupdate=datetime.utcnow) diff --git a/level_3/rag_test_manager.py b/level_3/rag_test_manager.py index 1dbe0fcaa..2d5eb38fd 100644 --- a/level_3/rag_test_manager.py +++ b/level_3/rag_test_manager.py @@ -197,8 +197,8 @@ def generate_param_variants( "text", "hybrid", "bm25", - "generate", - "generate_grouped", + # "generate", + # "generate_grouped", ] param_ranges["embeddings"] = [ "openai", @@ -309,6 +309,20 @@ async def eval_test( # print(test_result) +def count_files_in_data_folder(data_folder_path=".data"): + try: + # Get the list of files in the specified folder + files = os.listdir(data_folder_path) + + # Count the number of files + file_count = len(files) + + return file_count + except FileNotFoundError: + return 0 # Return 0 if the folder does not exist + except Exception as e: + print(f"An error occurred: {str(e)}") + return -1 # Return -1 to indicate an error def data_format_route(data_string: str): @ai_classifier class FormatRoute(Enum): @@ -409,7 +423,6 @@ async def start_test( "source": f"{data_location}", "path": data, } - if job_id is None: job_id = str(uuid.uuid4()) @@ -419,6 +432,7 @@ async def start_test( id=job_id, user_id=user_id, operation_params=str(test_params), + number_of_files=count_files_in_data_folder(), operation_type=retriever_type, test_set_id=test_set_id, ), @@ -446,6 +460,11 @@ async def start_test( print("Available memory classes:", await memory.list_memory_classes()) if test: loader_settings.update(test) + # Check if the search_type is 'none' + if loader_settings.get('search_type') == 'none': + # Change it to 'hybrid' + loader_settings['search_type'] = 'hybrid' + test_class = test_id + "_class" dynamic_memory_class = getattr(memory, test_class.lower(), None) @@ -465,17 +484,20 @@ async def start_test( ) return "Loaded test element" - async def run_search_element(test_item, test_id): + async def run_search_element(test_item, test_id, search_type="text"): retrieve_action = await memory.dynamic_method_call( dynamic_memory_class, "fetch_memories", - observation=str(test_item["question"]), + observation=str(test_item["question"]), search_type=loader_settings.get('search_type'), ) print( "Here is the test result", - str(retrieve_action["data"]["Get"][test_id][0]["text"]), + str(retrieve_action), ) - return retrieve_action["data"]["Get"][test_id][0]["text"] + if loader_settings.get('search_type') == 'bm25': + return retrieve_action["data"]["Get"][test_id] + else: + return retrieve_action["data"]["Get"][test_id][0]["text"] async def run_eval(test_item, search_result): test_eval = await eval_test( diff --git a/level_3/superset/superset_dashboard_configs/charts/Best_performing_output_2.yaml b/level_3/superset/superset_dashboard_configs/charts/Best_performing_output_2.yaml new file mode 100644 index 000000000..89a155ba2 --- /dev/null +++ b/level_3/superset/superset_dashboard_configs/charts/Best_performing_output_2.yaml @@ -0,0 +1,69 @@ +slice_name: Best performing output +description: null +certified_by: null +certification_details: null +viz_type: table +params: + datasource: 1__table + viz_type: table + query_mode: aggregate + groupby: + - test_output_test_params + - test_set_id + time_grain_sqla: P1D + temporal_columns_lookup: + test_set_created_at: true + test_set_updated_at: true + test_output_created_at: true + test_output_updated_at: true + operation_created_at: true + operation_updated_at: true + metrics: + - expressionType: SIMPLE + column: + advanced_data_type: null + certification_details: null + certified_by: null + column_name: test_output_test_score + description: null + expression: null + filterable: true + groupby: true + id: 14 + is_certified: false + is_dttm: false + python_date_format: null + type: STRING + type_generic: 1 + verbose_name: null + warning_markdown: null + aggregate: AVG + sqlExpression: null + datasourceWarning: false + hasCustomLabel: false + label: AVG(test_output_test_score) + optionName: metric_nxixusdqyl8_n8z39bhgnfs + all_columns: [] + percent_metrics: [] + adhoc_filters: + - clause: WHERE + subject: test_set_created_at + operator: TEMPORAL_RANGE + comparator: No filter + expressionType: SIMPLE + order_by_cols: [] + row_limit: 1000 + server_page_length: 10 + order_desc: true + table_timestamp_format: smart_date + show_cell_bars: true + color_pn: true + extra_form_data: {} + dashboards: [] +query_context: '{"datasource":{"id":1,"type":"table"},"force":false,"queries":[{"filters":[{"col":"test_set_created_at","op":"TEMPORAL_RANGE","val":"No + filter"}],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":["test_output_test_params","test_set_id"],"metrics":[{"expressionType":"SIMPLE","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"test_output_test_score","description":null,"expression":null,"filterable":true,"groupby":true,"id":14,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"STRING","type_generic":1,"verbose_name":null,"warning_markdown":null},"aggregate":"AVG","sqlExpression":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"AVG(test_output_test_score)","optionName":"metric_nxixusdqyl8_n8z39bhgnfs"}],"orderby":[[{"expressionType":"SIMPLE","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"test_output_test_score","description":null,"expression":null,"filterable":true,"groupby":true,"id":14,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"STRING","type_generic":1,"verbose_name":null,"warning_markdown":null},"aggregate":"AVG","sqlExpression":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"AVG(test_output_test_score)","optionName":"metric_nxixusdqyl8_n8z39bhgnfs"},false]],"annotation_layers":[],"row_limit":1000,"series_limit":0,"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"post_processing":[]}],"form_data":{"datasource":"1__table","viz_type":"table","query_mode":"aggregate","groupby":["test_output_test_params","test_set_id"],"time_grain_sqla":"P1D","temporal_columns_lookup":{"test_set_created_at":true,"test_set_updated_at":true,"test_output_created_at":true,"test_output_updated_at":true,"operation_created_at":true,"operation_updated_at":true},"metrics":[{"expressionType":"SIMPLE","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"test_output_test_score","description":null,"expression":null,"filterable":true,"groupby":true,"id":14,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"STRING","type_generic":1,"verbose_name":null,"warning_markdown":null},"aggregate":"AVG","sqlExpression":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"AVG(test_output_test_score)","optionName":"metric_nxixusdqyl8_n8z39bhgnfs"}],"all_columns":[],"percent_metrics":[],"adhoc_filters":[{"clause":"WHERE","subject":"test_set_created_at","operator":"TEMPORAL_RANGE","comparator":"No + filter","expressionType":"SIMPLE"}],"order_by_cols":[],"row_limit":1000,"server_page_length":10,"order_desc":true,"table_timestamp_format":"smart_date","show_cell_bars":true,"color_pn":true,"extra_form_data":{},"dashboards":[],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}' +cache_timeout: null +uuid: c2e6a932-b70b-4c8a-840f-fb0588b1c684 +version: 1.0.0 +dataset_uuid: 5beee33d-fbe8-42bb-993c-d5a3d8aacdd4 diff --git a/level_3/superset/superset_dashboard_configs/charts/Count_of_tests_done_3.yaml b/level_3/superset/superset_dashboard_configs/charts/Count_of_tests_done_3.yaml new file mode 100644 index 000000000..5eb306539 --- /dev/null +++ b/level_3/superset/superset_dashboard_configs/charts/Count_of_tests_done_3.yaml @@ -0,0 +1,71 @@ +slice_name: Count of tests done +description: null +certified_by: null +certification_details: null +viz_type: echarts_area +params: + datasource: 1__table + viz_type: echarts_area + x_axis: operation_created_at + time_grain_sqla: PT1H + x_axis_sort_asc: true + x_axis_sort_series: name + x_axis_sort_series_ascending: true + metrics: + - expressionType: SQL + sqlExpression: count( operation_id) + column: null + aggregate: null + datasourceWarning: false + hasCustomLabel: false + label: count( operation_id) + optionName: metric_5qjjrqt6buq_n99pdy96ita + groupby: [] + adhoc_filters: + - expressionType: SIMPLE + subject: operation_created_at + operator: TEMPORAL_RANGE + comparator: No filter + clause: WHERE + sqlExpression: null + isExtra: false + isNew: false + datasourceWarning: false + filterOptionName: filter_jnu1rlcexmi_erv8wktt8cp + order_desc: true + row_limit: 10000 + truncate_metric: true + show_empty_columns: true + comparison_type: values + annotation_layers: [] + forecastPeriods: 10 + forecastInterval: 0.8 + x_axis_title_margin: 15 + y_axis_title_margin: 15 + y_axis_title_position: Left + sort_series_type: sum + color_scheme: supersetColors + seriesType: line + opacity: 0.2 + only_total: true + markerSize: 6 + show_legend: true + legendType: scroll + legendOrientation: top + x_axis_time_format: smart_date + rich_tooltip: true + tooltipTimeFormat: smart_date + y_axis_format: SMART_NUMBER + y_axis_bounds: + - null + - null + extra_form_data: {} + dashboards: + - 1 +query_context: '{"datasource":{"id":1,"type":"table"},"force":false,"queries":[{"filters":[{"col":"operation_created_at","op":"TEMPORAL_RANGE","val":"No + filter"}],"extras":{"having":"","where":""},"applied_time_extras":{},"columns":[{"timeGrain":"PT1H","columnType":"BASE_AXIS","sqlExpression":"operation_created_at","label":"operation_created_at","expressionType":"SQL"}],"metrics":[{"expressionType":"SQL","sqlExpression":"count( operation_id)","column":null,"aggregate":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"count( operation_id)","optionName":"metric_5qjjrqt6buq_n99pdy96ita"}],"orderby":[[{"expressionType":"SQL","sqlExpression":"count( operation_id)","column":null,"aggregate":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"count( operation_id)","optionName":"metric_5qjjrqt6buq_n99pdy96ita"},false]],"annotation_layers":[],"row_limit":10000,"series_columns":[],"series_limit":0,"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"time_offsets":[],"post_processing":[{"operation":"pivot","options":{"index":["operation_created_at"],"columns":[],"aggregates":{"count( operation_id)":{"operator":"mean"}},"drop_missing_columns":false}},{"operation":"flatten"}]}],"form_data":{"datasource":"1__table","viz_type":"echarts_area","x_axis":"operation_created_at","time_grain_sqla":"PT1H","x_axis_sort_asc":true,"x_axis_sort_series":"name","x_axis_sort_series_ascending":true,"metrics":[{"expressionType":"SQL","sqlExpression":"count( operation_id)","column":null,"aggregate":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"count( operation_id)","optionName":"metric_5qjjrqt6buq_n99pdy96ita"}],"groupby":[],"adhoc_filters":[{"expressionType":"SIMPLE","subject":"operation_created_at","operator":"TEMPORAL_RANGE","comparator":"No + filter","clause":"WHERE","sqlExpression":null,"isExtra":false,"isNew":false,"datasourceWarning":false,"filterOptionName":"filter_jnu1rlcexmi_erv8wktt8cp"}],"order_desc":true,"row_limit":10000,"truncate_metric":true,"show_empty_columns":true,"comparison_type":"values","annotation_layers":[],"forecastPeriods":10,"forecastInterval":0.8,"x_axis_title_margin":15,"y_axis_title_margin":15,"y_axis_title_position":"Left","sort_series_type":"sum","color_scheme":"supersetColors","seriesType":"line","opacity":0.2,"only_total":true,"markerSize":6,"show_legend":true,"legendType":"scroll","legendOrientation":"top","x_axis_time_format":"smart_date","rich_tooltip":true,"tooltipTimeFormat":"smart_date","y_axis_format":"SMART_NUMBER","y_axis_bounds":[null,null],"extra_form_data":{},"dashboards":[1],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}' +cache_timeout: null +uuid: e9a83273-19d2-4336-ab74-8b672f0a740f +version: 1.0.0 +dataset_uuid: 5beee33d-fbe8-42bb-993c-d5a3d8aacdd4 diff --git a/level_3/superset/superset_dashboard_configs/charts/Worst_and_best_Questions_4.yaml b/level_3/superset/superset_dashboard_configs/charts/Worst_and_best_Questions_4.yaml new file mode 100644 index 000000000..7f94b8032 --- /dev/null +++ b/level_3/superset/superset_dashboard_configs/charts/Worst_and_best_Questions_4.yaml @@ -0,0 +1,69 @@ +slice_name: Worst and best Questions +description: null +certified_by: null +certification_details: null +viz_type: table +params: + datasource: 1__table + viz_type: table + query_mode: aggregate + groupby: + - test_output_test_query + time_grain_sqla: P1D + temporal_columns_lookup: + test_set_created_at: true + test_set_updated_at: true + test_output_created_at: true + test_output_updated_at: true + operation_created_at: true + operation_updated_at: true + metrics: + - expressionType: SIMPLE + column: + advanced_data_type: null + certification_details: null + certified_by: null + column_name: test_output_test_score + description: null + expression: null + filterable: true + groupby: true + id: 14 + is_certified: false + is_dttm: false + python_date_format: null + type: STRING + type_generic: 1 + verbose_name: null + warning_markdown: null + aggregate: MIN + sqlExpression: null + datasourceWarning: false + hasCustomLabel: false + label: MIN(test_output_test_score) + optionName: metric_c9hj21bwl4l_pxotnsceo3 + all_columns: [] + percent_metrics: [] + adhoc_filters: + - clause: WHERE + subject: test_set_created_at + operator: TEMPORAL_RANGE + comparator: No filter + expressionType: SIMPLE + order_by_cols: [] + row_limit: 1000 + server_page_length: 10 + order_desc: true + table_timestamp_format: smart_date + show_cell_bars: true + color_pn: true + extra_form_data: {} + dashboards: + - 1 +query_context: '{"datasource":{"id":1,"type":"table"},"force":false,"queries":[{"filters":[{"col":"test_set_created_at","op":"TEMPORAL_RANGE","val":"No + filter"}],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":["test_output_test_query"],"metrics":[{"expressionType":"SIMPLE","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"test_output_test_score","description":null,"expression":null,"filterable":true,"groupby":true,"id":14,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"STRING","type_generic":1,"verbose_name":null,"warning_markdown":null},"aggregate":"MIN","sqlExpression":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"MIN(test_output_test_score)","optionName":"metric_c9hj21bwl4l_pxotnsceo3"}],"orderby":[[{"expressionType":"SIMPLE","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"test_output_test_score","description":null,"expression":null,"filterable":true,"groupby":true,"id":14,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"STRING","type_generic":1,"verbose_name":null,"warning_markdown":null},"aggregate":"MIN","sqlExpression":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"MIN(test_output_test_score)","optionName":"metric_c9hj21bwl4l_pxotnsceo3"},false]],"annotation_layers":[],"row_limit":1000,"series_limit":0,"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"post_processing":[]}],"form_data":{"datasource":"1__table","viz_type":"table","query_mode":"aggregate","groupby":["test_output_test_query"],"time_grain_sqla":"P1D","temporal_columns_lookup":{"test_set_created_at":true,"test_set_updated_at":true,"test_output_created_at":true,"test_output_updated_at":true,"operation_created_at":true,"operation_updated_at":true},"metrics":[{"expressionType":"SIMPLE","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"test_output_test_score","description":null,"expression":null,"filterable":true,"groupby":true,"id":14,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"STRING","type_generic":1,"verbose_name":null,"warning_markdown":null},"aggregate":"MIN","sqlExpression":null,"datasourceWarning":false,"hasCustomLabel":false,"label":"MIN(test_output_test_score)","optionName":"metric_c9hj21bwl4l_pxotnsceo3"}],"all_columns":[],"percent_metrics":[],"adhoc_filters":[{"clause":"WHERE","subject":"test_set_created_at","operator":"TEMPORAL_RANGE","comparator":"No + filter","expressionType":"SIMPLE"}],"order_by_cols":[],"row_limit":1000,"server_page_length":10,"order_desc":true,"table_timestamp_format":"smart_date","show_cell_bars":true,"color_pn":true,"extra_form_data":{},"dashboards":[1],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}' +cache_timeout: null +uuid: 1489e576-ad83-402e-ba08-2613cb145ddd +version: 1.0.0 +dataset_uuid: 5beee33d-fbe8-42bb-993c-d5a3d8aacdd4 diff --git a/level_3/superset/superset_dashboard_configs/dashboards/Overview_Dashboard_1.yaml b/level_3/superset/superset_dashboard_configs/dashboards/Overview_Dashboard_1.yaml new file mode 100644 index 000000000..247c7ce70 --- /dev/null +++ b/level_3/superset/superset_dashboard_configs/dashboards/Overview_Dashboard_1.yaml @@ -0,0 +1,116 @@ +dashboard_title: Overview Dashboard +description: null +css: '' +slug: null +certified_by: '' +certification_details: '' +published: false +uuid: f39f8c41-5347-48c4-a309-6943ee31a160 +position: + CHART-_kJTo2qbWQ: + children: [] + id: CHART-_kJTo2qbWQ + meta: + chartId: 2 + height: 50 + sliceName: Best performing output + uuid: c2e6a932-b70b-4c8a-840f-fb0588b1c684 + width: 12 + parents: + - ROOT_ID + - GRID_ID + - ROW-9iwNFB20D8 + type: CHART + DASHBOARD_VERSION_KEY: v2 + GRID_ID: + children: + - ROW-9iwNFB20D8 + - ROW-N-OC7SJNF7 + id: GRID_ID + parents: + - ROOT_ID + type: GRID + HEADER_ID: + id: HEADER_ID + meta: + text: Overview Dashboard + type: HEADER + ROOT_ID: + children: + - GRID_ID + id: ROOT_ID + type: ROOT + ROW-9iwNFB20D8: + children: + - CHART-_kJTo2qbWQ + id: ROW-9iwNFB20D8 + meta: + background: BACKGROUND_TRANSPARENT + parents: + - ROOT_ID + - GRID_ID + type: ROW + ROW-N-OC7SJNF7: + children: + - CHART-V7Z2TPFG + - CHART-1EB1EWUY + id: ROW-N-OC7SJNF7 + meta: + '0': ROOT_ID + background: BACKGROUND_TRANSPARENT + type: ROW + parents: + - ROOT_ID + - GRID_ID + CHART-V7Z2TPFG: + children: [] + id: CHART-V7Z2TPFG + meta: + chartId: 4 + height: 50 + sliceName: Worst and best Questions + uuid: 1489e576-ad83-402e-ba08-2613cb145ddd + width: 4 + type: CHART + parents: + - ROOT_ID + - GRID_ID + - ROW-N-OC7SJNF7 + CHART-1EB1EWUY: + children: [] + id: CHART-1EB1EWUY + meta: + chartId: 3 + height: 50 + sliceName: Count of tests done + uuid: e9a83273-19d2-4336-ab74-8b672f0a740f + width: 4 + type: CHART + parents: + - ROOT_ID + - GRID_ID + - ROW-N-OC7SJNF7 +metadata: + chart_configuration: + '2': + id: 2 + crossFilters: + scope: global + chartsInScope: [] + global_chart_configuration: + scope: + rootPath: + - ROOT_ID + excluded: [] + chartsInScope: + - 2 + color_scheme: '' + refresh_frequency: 0 + expanded_slices: {} + label_colors: {} + timed_refresh_immune_slices: [] + cross_filters_enabled: true + default_filters: '{}' + shared_label_colors: {} + color_scheme_domain: [] +version: 1.0.0 diff --git a/level_3/superset/superset_dashboard_configs/databases/PostgreSQL.yaml b/level_3/superset/superset_dashboard_configs/databases/PostgreSQL.yaml new file mode 100644 index 000000000..2ae5192fe --- /dev/null +++ b/level_3/superset/superset_dashboard_configs/databases/PostgreSQL.yaml @@ -0,0 +1,13 @@ +database_name: PostgreSQL +sqlalchemy_uri: postgresql+psycopg2://bla:XXXXXXXXXX@postgres:5432/bubu +cache_timeout: null +expose_in_sqllab: true +allow_run_async: false +allow_ctas: false +allow_cvas: false +allow_dml: false +allow_file_upload: false +extra: + allows_virtual_table_explore: true +uuid: 8cf1f33f-2382-454f-b436-e8a51a3b27ae +version: 1.0.0 diff --git a/level_3/superset/superset_dashboard_configs/datasets/PostgreSQL/explore_query.yaml b/level_3/superset/superset_dashboard_configs/datasets/PostgreSQL/explore_query.yaml new file mode 100644 index 000000000..2b4ddc5f5 --- /dev/null +++ b/level_3/superset/superset_dashboard_configs/datasets/PostgreSQL/explore_query.yaml @@ -0,0 +1,410 @@ +table_name: explore_query +main_dttm_col: test_set_created_at +description: null +default_endpoint: null +offset: 0 +cache_timeout: null +schema: public +sql: "SELECT\n ts.id AS test_set_id,\n too.id AS test_output_id,\n op.id\ + \ AS operation_id,\n ts.user_id AS test_set_user_id,\n ts.content AS test_set_content,\n\ + \ ts.created_at AS test_set_created_at,\n ts.updated_at AS test_set_updated_at,\n\ + \ too.set_id AS test_output_set_id,\n too.user_id AS test_output_user_id,\n\ + \ too.test_set_id AS test_output_test_set_id,\n too.operation_id AS test_output_operation_id,\n\ + \ too.test_params AS test_output_test_params,\n too.test_result AS test_output_test_result,\n\ + \ cast(too.test_score as numeric) AS test_output_test_score,\n too.test_metric_name\ + \ AS test_output_test_metric_name,\n too.test_query AS test_output_test_query,\n\ + \ too.test_output AS test_output_test_output,\n too.test_expected_output AS\ + \ test_output_test_expected_output,\n too.test_context AS test_output_test_context,\n\ + \ too.test_results AS test_output_test_results,\n too.created_at AS test_output_created_at,\n\ + \ too.updated_at AS test_output_updated_at,\n op.user_id AS operation_user_id,\n\ + \ op.operation_type AS operation_operation_type,\n op.operation_params AS\ + \ operation_operation_params,\n op.test_set_id AS operation_test_set_id,\n \ + \ op.created_at AS operation_created_at,\n op.updated_at AS operation_updated_at\n\ + FROM public.test_sets ts\nLEFT JOIN public.test_outputs too ON ts.id = too.test_set_id\n\ + LEFT JOIN public.operations op ON op.id = too.operation_id;\n" +params: null +template_params: null +filter_select_enabled: true +fetch_values_predicate: null +extra: null +normalize_columns: false +always_filter_main_dttm: false +uuid: 5beee33d-fbe8-42bb-993c-d5a3d8aacdd4 +metrics: +- metric_name: count + verbose_name: COUNT(*) + metric_type: count + expression: COUNT(*) + description: null + d3format: null + currency: null + extra: + warning_markdown: '' + warning_text: null +columns: +- column_name: test_set_created_at + verbose_name: null + is_dttm: true + is_active: true + type: DATETIME + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_created_at + verbose_name: null + is_dttm: true + is_active: true + type: DATETIME + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_set_updated_at + verbose_name: null + is_dttm: true + is_active: true + type: DATETIME + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_updated_at + verbose_name: null + is_dttm: true + is_active: true + type: DATETIME + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: operation_created_at + verbose_name: null + is_dttm: true + is_active: true + type: DATETIME + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: operation_updated_at + verbose_name: null + is_dttm: true + is_active: true + type: DATETIME + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_metric_name + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_expected_output + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_set_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_params + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: operation_test_set_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_operation_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_context + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_score + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_set_user_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_user_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_set_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_result + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_query + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_output + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: operation_operation_params + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: operation_operation_type + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: operation_user_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_set_content + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_set_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: operation_id + verbose_name: null + is_dttm: false + is_active: true + type: STRING + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +- column_name: test_output_test_results + verbose_name: null + is_dttm: false + is_active: true + type: JSON + advanced_data_type: null + groupby: true + filterable: true + expression: null + description: null + python_date_format: null + extra: + warning_markdown: null +version: 1.0.0 +database_uuid: 8cf1f33f-2382-454f-b436-e8a51a3b27ae diff --git a/level_3/superset/superset_dashboard_configs/metadata.yaml b/level_3/superset/superset_dashboard_configs/metadata.yaml new file mode 100644 index 000000000..2060199c7 --- /dev/null +++ b/level_3/superset/superset_dashboard_configs/metadata.yaml @@ -0,0 +1,3 @@ +version: 1.0.0 +type: Dashboard +timestamp: '2023-10-27T15:30:30.705718+00:00' diff --git a/level_3/vectordb/basevectordb.py b/level_3/vectordb/basevectordb.py index 18e022ce2..69ce66784 100644 --- a/level_3/vectordb/basevectordb.py +++ b/level_3/vectordb/basevectordb.py @@ -276,7 +276,7 @@ class BaseMemory: n_of_observations: Optional[int] = 2, ): logging.info(namespace) - logging.info(search_type) + logging.info("The search type is %", search_type) logging.info(params) logging.info(observation) diff --git a/level_3/vectordb/vectordb.py b/level_3/vectordb/vectordb.py index e11655db1..55894a405 100644 --- a/level_3/vectordb/vectordb.py +++ b/level_3/vectordb/vectordb.py @@ -185,7 +185,7 @@ class WeaviateVectorDB(VectorDB): client = self.init_weaviate(namespace =self.namespace) if search_type is None: search_type = 'hybrid' - + logging.info("The search type is 2 %", search_type) if not namespace: namespace = self.namespace