From 1851470d3c53ffc936aaee2a2218bf4ee11c966e Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Wed, 21 Aug 2024 23:03:27 +0000 Subject: [PATCH 01/31] fix: always turn group_by column in xy_plot to str --- code/util/streamlit.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/util/streamlit.py b/code/util/streamlit.py index 97afa29..7988287 100644 --- a/code/util/streamlit.py +++ b/code/util/streamlit.py @@ -1004,9 +1004,8 @@ def _add_agg(df_this, x_name, y_name, group, aggr_method, if_use_x_quantile, q_q else: df['dot_size'] = dot_size_base - # Turn column of group_by to string if it's not - if not is_string_dtype(df[group_by]): - df[group_by] = df[group_by].astype(str) + # Always turn group_by column to str + df[group_by] = df[group_by].astype(str) # Add a diagonal line first if if_show_diagonal: From 7d548eeedb34e223a8aa15e38cb353e0f65e6b9c Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Wed, 21 Aug 2024 23:08:43 +0000 Subject: [PATCH 02/31] build: update config.toml --- .streamlit/config.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.streamlit/config.toml b/.streamlit/config.toml index c9b8c45..3b0d455 100644 --- a/.streamlit/config.toml +++ b/.streamlit/config.toml @@ -1,2 +1,8 @@ [theme] -base="dark" \ No newline at end of file +base="dark" + +[server] +fileWatcherType = "poll" + +[global] +disableWidgetStateDuplicationWarning = true \ No newline at end of file From 9bbe44eaf8e3517c3b4bc17a6cd5fb52f37ae46a Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Wed, 21 Aug 2024 23:08:50 +0000 Subject: [PATCH 03/31] ci: bump version --- code/Home.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Home.py b/code/Home.py index bb1c9f9..cd7bbc2 100644 --- a/code/Home.py +++ b/code/Home.py @@ -12,7 +12,7 @@ """ -__ver__ = 'v2.4.1' +__ver__ = 'v2.5.0' import pandas as pd import streamlit as st From 4bf1feef33088d942d09451de2bd3c6a3c366741 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Wed, 21 Aug 2024 23:12:51 +0000 Subject: [PATCH 04/31] add notes --- code/pages/3_AIND data access playground.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/pages/3_AIND data access playground.py b/code/pages/3_AIND data access playground.py index ea36fd9..1ea1089 100644 --- a/code/pages/3_AIND data access playground.py +++ b/code/pages/3_AIND data access playground.py @@ -21,6 +21,8 @@ df = load_data_from_docDB() +st.markdown(f'### Note: the dataframe showing here has been merged in to the master table on the Home page!') + dynamic_filters = DynamicFilters( df=df, filters=['subject_id', 'subject_genotype']) From 67e86ac5a978a372e2da1ead6246ac9cdf161fdd Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 22 Aug 2024 00:00:21 +0000 Subject: [PATCH 05/31] hotfix: add warning message if regex is incorrect --- code/Home.py | 2 +- code/util/streamlit.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/Home.py b/code/Home.py index cd7bbc2..a7fcca4 100644 --- a/code/Home.py +++ b/code/Home.py @@ -12,7 +12,7 @@ """ -__ver__ = 'v2.5.0' +__ver__ = 'v2.5.1' import pandas as pd import streamlit as st diff --git a/code/util/streamlit.py b/code/util/streamlit.py index 7988287..2656cfc 100644 --- a/code/util/streamlit.py +++ b/code/util/streamlit.py @@ -395,7 +395,10 @@ def filter_dataframe(df: pd.DataFrame, ) if user_text_input: - df = df[df[column].astype(str).str.contains(user_text_input)] + try: + df = df[df[column].astype(str).str.contains(user_text_input, regex=True)] + except: + st.warning('Wrong regular expression!') return df From 8f65c70c762b627a3490435583f835b7fef51c53 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 22 Aug 2024 00:10:55 +0000 Subject: [PATCH 06/31] hotfix: dict | dict in lower python version --- code/Home.py | 2 +- code/util/fetch_data_docDB.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/Home.py b/code/Home.py index a7fcca4..0ab0b2a 100644 --- a/code/Home.py +++ b/code/Home.py @@ -12,7 +12,7 @@ """ -__ver__ = 'v2.5.1' +__ver__ = 'v2.5.2' import pandas as pd import streamlit as st diff --git a/code/util/fetch_data_docDB.py b/code/util/fetch_data_docDB.py index 0136684..a3ed351 100644 --- a/code/util/fetch_data_docDB.py +++ b/code/util/fetch_data_docDB.py @@ -64,7 +64,7 @@ def fetch_fip_data(client): logger.warning(f"found {len(name_results)} results") # in case there is overlap between these two queries, filter down to a single list with unique IDs - unique_results_by_id = { r['_id']: r for r in modality_results } | { r['_id']: r for r in name_results } + unique_results_by_id = {**{ r['_id']: r for r in modality_results }, **{ r['_id']: r for r in name_results }} results = list(unique_results_by_id.values()) logger.warning(f"found {len(results)} unique results") From 2f2e84c908978c215bfc44455b68832159277713 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 22 Aug 2024 06:18:38 +0000 Subject: [PATCH 07/31] feat: add docDB column --- code/Home.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/Home.py b/code/Home.py index 0ab0b2a..ae1b813 100644 --- a/code/Home.py +++ b/code/Home.py @@ -456,6 +456,20 @@ def _get_data_source(rig): # --- Load data from docDB --- _df = merge_in_df_docDB(_df) + + # add docDB_status column + _df["docDB_status"] = _df.apply( + lambda row: ( + "not uploaded" + if pd.isnull(row["location"]) + else ( + "uploaded but not processed" + if pd.isnull(row["results_location"]) + else "uploaded and processed" + ) + ), + axis=1, + ) st.session_state.df['sessions_bonsai'] = _df # Somehow _df loses the reference to the original dataframe st.session_state.session_stats_names = [keys for keys in _df.keys()] From 31b060f159d516b3d1f484158d0800d3dfa28c44 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 22 Aug 2024 06:18:49 +0000 Subject: [PATCH 08/31] build: CO code-server --- environment/postInstall | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/environment/postInstall b/environment/postInstall index 6df0669..b81b858 100755 --- a/environment/postInstall +++ b/environment/postInstall @@ -12,9 +12,12 @@ if [ ! -d "/.vscode/extensions" ] code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension ms-python.python code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension njpwerner.autodocstring code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension KevinRose.vsc-python-indent - code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension sugatoray.vscode-git-extension-pack code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension mhutchie.git-graph - + code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension zhuangtongfa.material-theme + code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension ms-python.black-formatter + code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension eamodio.gitlens + code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension ryanluker.vscode-coverage-gutters + else echo "code-server not found" - fi + fi \ No newline at end of file From d72f50d8709f85dfef3ef6d2d30fdceed7f1ff59 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 22 Aug 2024 06:35:20 +0000 Subject: [PATCH 09/31] minor: order the status --- code/Home.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/Home.py b/code/Home.py index ae1b813..d5c09a8 100644 --- a/code/Home.py +++ b/code/Home.py @@ -460,12 +460,12 @@ def _get_data_source(rig): # add docDB_status column _df["docDB_status"] = _df.apply( lambda row: ( - "not uploaded" + "0_not uploaded" if pd.isnull(row["location"]) else ( - "uploaded but not processed" + "1_uploaded but not processed" if pd.isnull(row["results_location"]) - else "uploaded and processed" + else "2_uploaded and processed" ) ), axis=1, From 9036a778c3d10a5386f6d9e1d57a702d8847120c Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 22 Aug 2024 06:41:17 +0000 Subject: [PATCH 10/31] ci: bump version --- code/Home.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Home.py b/code/Home.py index d5c09a8..88aaa9a 100644 --- a/code/Home.py +++ b/code/Home.py @@ -12,7 +12,7 @@ """ -__ver__ = 'v2.5.2' +__ver__ = 'v2.5.3' import pandas as pd import streamlit as st From 2c6d655870b533bdbf0b386b92addf4ec3c43ea2 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 22 Aug 2024 06:49:44 +0000 Subject: [PATCH 11/31] feat: add Check docDB status in pygwalker --- gw_config.json | 3632 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 3531 insertions(+), 101 deletions(-) diff --git a/gw_config.json b/gw_config.json index 11c9266..8d72743 100644 --- a/gw_config.json +++ b/gw_config.json @@ -205,7 +205,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_video", - "dragId": "GW_2WFpZTxq" + "dragId": "GW_2WFpZTxq", + "offset": 0 }, { "fid": "has_ephys", @@ -213,7 +214,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_ephys", - "dragId": "GW_zEX6LQVa" + "dragId": "GW_zEX6LQVa", + "offset": 0 }, { "fid": "old_bpod_session", @@ -221,7 +223,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "old_bpod_session", - "dragId": "GW_CxAuDhVz" + "dragId": "GW_CxAuDhVz", + "offset": 0 }, { "fid": "institute", @@ -229,7 +232,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "institute", - "dragId": "GW_kZ3nBOU9" + "dragId": "GW_kZ3nBOU9", + "offset": 0 }, { "fid": "rig_type", @@ -237,7 +241,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "rig_type", - "dragId": "GW_qhiUSQPC" + "dragId": "GW_qhiUSQPC", + "offset": 0 }, { "fid": "room", @@ -245,7 +250,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "room", - "dragId": "GW_vN6TegxB" + "dragId": "GW_vN6TegxB", + "offset": 0 }, { "fid": "hardware", @@ -253,7 +259,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "hardware", - "dragId": "GW_7vKJHUYO" + "dragId": "GW_7vKJHUYO", + "offset": 0 }, { "fid": "data_source", @@ -261,7 +268,120 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "data_source", - "dragId": "GW_B1xgPbEL" + "dragId": "GW_B1xgPbEL", + "offset": 0 + }, + { + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_1_target_areas", + "dragId": "GW_ipL0EUva" + }, + { + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_2_target_areas", + "dragId": "GW_KZwecAag" + }, + { + "fid": "commit_ID", + "name": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "commit_ID", + "dragId": "GW_B07Czkx9" + }, + { + "fid": "repo_url", + "name": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "repo_url", + "dragId": "GW_mOdQXJb5" + }, + { + "fid": "current_branch", + "name": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "current_branch", + "dragId": "GW_deB47ZHc" + }, + { + "fid": "location", + "name": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "location", + "dragId": "GW_1ZxohQOf" + }, + { + "fid": "session_name", + "name": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_name", + "dragId": "GW_L8ix2XlN" + }, + { + "fid": "creation_time", + "name": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "creation_time", + "dragId": "GW_L45qlHfK" + }, + { + "fid": "subject_genotype", + "name": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "subject_genotype", + "dragId": "GW_t2e0Vw9J" + }, + { + "fid": "probes", + "name": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "probes", + "dragId": "GW_xsM5kpSu" + }, + { + "fid": "results", + "name": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results", + "dragId": "GW_YMGTKrga" + }, + { + "fid": "results_location", + "name": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results_location", + "dragId": "GW_25uFhek3" + }, + { + "fid": "session_time", + "name": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_time", + "dragId": "GW_Zrvp2FCg" + }, + { + "fid": "docDB_status", + "name": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "docDB_status", + "dragId": "GW_QPJswGtK" } ], "measures": [ @@ -1546,6 +1666,110 @@ "basename": "abs(logistic_Miller2021_bias)", "dragId": "GW_7Vb6z9Mv", "offset": 0 + }, + { + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_1_calibration_power", + "dragId": "GW_gqS76R4U" + }, + { + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_2_calibration_power", + "dragId": "GW_zOyFV2mC" + }, + { + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_mean", + "dragId": "GW_gsPqw2jL" + }, + { + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_std", + "dragId": "GW_A0W5bQkM" + }, + { + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_mean", + "dragId": "GW_vxbRtez9" + }, + { + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_std", + "dragId": "GW_Mpx6GP8j" + }, + { + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_mean", + "dragId": "GW_nVvN3xSd" + }, + { + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_std", + "dragId": "GW_Ldivz2I9" + }, + { + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_mean", + "dragId": "GW_dNSPfLby" + }, + { + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_std", + "dragId": "GW_Yd5teJIX" + }, + { + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "avg_trial_length_in_seconds", + "dragId": "GW_xVDiuX7q" + }, + { + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_day_total_last_session", + "dragId": "GW_Cn2XO6Ge" + }, + { + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_after_session_last_session", + "dragId": "GW_D6xLrY9I" } ], "rows": [ @@ -1866,7 +2090,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_video", - "dragId": "GW_Cdfo8s0e" + "dragId": "GW_Cdfo8s0e", + "offset": 0 }, { "fid": "has_ephys", @@ -1874,7 +2099,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_ephys", - "dragId": "GW_E7NCF4ya" + "dragId": "GW_E7NCF4ya", + "offset": 0 }, { "fid": "old_bpod_session", @@ -1882,7 +2108,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "old_bpod_session", - "dragId": "GW_TIlKiJW1" + "dragId": "GW_TIlKiJW1", + "offset": 0 }, { "fid": "institute", @@ -1890,7 +2117,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "institute", - "dragId": "GW_GiIbtKYo" + "dragId": "GW_GiIbtKYo", + "offset": 0 }, { "fid": "rig_type", @@ -1898,7 +2126,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "rig_type", - "dragId": "GW_309LpyUt" + "dragId": "GW_309LpyUt", + "offset": 0 }, { "fid": "room", @@ -1906,7 +2135,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "room", - "dragId": "GW_PO5RApT8" + "dragId": "GW_PO5RApT8", + "offset": 0 }, { "fid": "hardware", @@ -1914,7 +2144,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "hardware", - "dragId": "GW_JD8sn7fz" + "dragId": "GW_JD8sn7fz", + "offset": 0 }, { "fid": "data_source", @@ -1922,7 +2153,120 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "data_source", - "dragId": "GW_ts9aSd4z" + "dragId": "GW_ts9aSd4z", + "offset": 0 + }, + { + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_1_target_areas", + "dragId": "GW_5s1ASprD" + }, + { + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_2_target_areas", + "dragId": "GW_xosyEpwm" + }, + { + "fid": "commit_ID", + "name": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "commit_ID", + "dragId": "GW_mTGcOo6R" + }, + { + "fid": "repo_url", + "name": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "repo_url", + "dragId": "GW_Fnhq9Zij" + }, + { + "fid": "current_branch", + "name": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "current_branch", + "dragId": "GW_IrLHFeoC" + }, + { + "fid": "location", + "name": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "location", + "dragId": "GW_TLzvNOlo" + }, + { + "fid": "session_name", + "name": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_name", + "dragId": "GW_OvaS1z2p" + }, + { + "fid": "creation_time", + "name": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "creation_time", + "dragId": "GW_eGImTzWA" + }, + { + "fid": "subject_genotype", + "name": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "subject_genotype", + "dragId": "GW_tTMPf7DX" + }, + { + "fid": "probes", + "name": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "probes", + "dragId": "GW_YaNzmQOR" + }, + { + "fid": "results", + "name": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results", + "dragId": "GW_8cSl0mLD" + }, + { + "fid": "results_location", + "name": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results_location", + "dragId": "GW_wU6vyC4M" + }, + { + "fid": "session_time", + "name": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_time", + "dragId": "GW_D7H5cVNu" + }, + { + "fid": "docDB_status", + "name": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "docDB_status", + "dragId": "GW_x3mD07ui" } ], "measures": [ @@ -3167,6 +3511,110 @@ "basename": "abs(logistic_Miller2021_bias)", "dragId": "GW_pWmeA4h1", "offset": 0 + }, + { + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_1_calibration_power", + "dragId": "GW_YFAe9UJH" + }, + { + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_2_calibration_power", + "dragId": "GW_32D4GOyY" + }, + { + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_mean", + "dragId": "GW_UGxWLkDq" + }, + { + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_std", + "dragId": "GW_dIKzoW0n" + }, + { + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_mean", + "dragId": "GW_snmPvWj7" + }, + { + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_std", + "dragId": "GW_6Z4ycqA0" + }, + { + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_mean", + "dragId": "GW_2PTjohR8" + }, + { + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_std", + "dragId": "GW_pLi35ug2" + }, + { + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_mean", + "dragId": "GW_gelvTLDc" + }, + { + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_std", + "dragId": "GW_9YjhFAub" + }, + { + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "avg_trial_length_in_seconds", + "dragId": "GW_ZHj17Oay" + }, + { + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_day_total_last_session", + "dragId": "GW_ok05uVFq" + }, + { + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_after_session_last_session", + "dragId": "GW_PUfDhAjO" } ], "rows": [ @@ -3427,7 +3875,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_video", - "dragId": "GW_xvZNz6ly" + "dragId": "GW_xvZNz6ly", + "offset": 0 }, { "fid": "has_ephys", @@ -3435,7 +3884,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_ephys", - "dragId": "GW_LfaGjIzQ" + "dragId": "GW_LfaGjIzQ", + "offset": 0 }, { "fid": "old_bpod_session", @@ -3443,7 +3893,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "old_bpod_session", - "dragId": "GW_Gufaj7xo" + "dragId": "GW_Gufaj7xo", + "offset": 0 }, { "fid": "institute", @@ -3451,7 +3902,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "institute", - "dragId": "GW_z1pxDdrJ" + "dragId": "GW_z1pxDdrJ", + "offset": 0 }, { "fid": "rig_type", @@ -3459,7 +3911,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "rig_type", - "dragId": "GW_aP9S0HbF" + "dragId": "GW_aP9S0HbF", + "offset": 0 }, { "fid": "room", @@ -3467,7 +3920,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "room", - "dragId": "GW_VwiJzWey" + "dragId": "GW_VwiJzWey", + "offset": 0 }, { "fid": "hardware", @@ -3475,7 +3929,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "hardware", - "dragId": "GW_ITK4MUEk" + "dragId": "GW_ITK4MUEk", + "offset": 0 }, { "fid": "data_source", @@ -3483,27 +3938,140 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "data_source", - "dragId": "GW_8VmNjt1i" - } - ], - "measures": [ - { - "dragId": "gw_e3R1", - "fid": "session", - "name": "session", - "basename": "session", - "analyticType": "measure", - "semanticType": "quantitative", - "aggName": "sum", + "dragId": "GW_8VmNjt1i", "offset": 0 }, { - "dragId": "gw_tEog", - "fid": "nwb_suffix", - "name": "nwb_suffix", - "basename": "nwb_suffix", - "analyticType": "measure", - "semanticType": "quantitative", + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_1_target_areas", + "dragId": "GW_Wql5RNTn" + }, + { + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_2_target_areas", + "dragId": "GW_bSzhJwPl" + }, + { + "fid": "commit_ID", + "name": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "commit_ID", + "dragId": "GW_jwtOQsNI" + }, + { + "fid": "repo_url", + "name": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "repo_url", + "dragId": "GW_kYmEVbTs" + }, + { + "fid": "current_branch", + "name": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "current_branch", + "dragId": "GW_vCbh6Zm8" + }, + { + "fid": "location", + "name": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "location", + "dragId": "GW_X1OLJdM6" + }, + { + "fid": "session_name", + "name": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_name", + "dragId": "GW_qAPWcK0o" + }, + { + "fid": "creation_time", + "name": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "creation_time", + "dragId": "GW_3ZemWwU1" + }, + { + "fid": "subject_genotype", + "name": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "subject_genotype", + "dragId": "GW_6XYNTSP1" + }, + { + "fid": "probes", + "name": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "probes", + "dragId": "GW_7UomPEFn" + }, + { + "fid": "results", + "name": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results", + "dragId": "GW_mKgB0vwn" + }, + { + "fid": "results_location", + "name": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results_location", + "dragId": "GW_Nn3ujOeq" + }, + { + "fid": "session_time", + "name": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_time", + "dragId": "GW_k37sZItO" + }, + { + "fid": "docDB_status", + "name": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "docDB_status", + "dragId": "GW_dmCOJ9GT" + } + ], + "measures": [ + { + "dragId": "gw_e3R1", + "fid": "session", + "name": "session", + "basename": "session", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_tEog", + "fid": "nwb_suffix", + "name": "nwb_suffix", + "basename": "nwb_suffix", + "analyticType": "measure", + "semanticType": "quantitative", "aggName": "sum", "offset": 0 }, @@ -4570,6 +5138,110 @@ "semanticType": "quantitative", "aggName": "sum", "offset": 0 + }, + { + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_1_calibration_power", + "dragId": "GW_f2LUntGY" + }, + { + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_2_calibration_power", + "dragId": "GW_snGSCoqi" + }, + { + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_mean", + "dragId": "GW_Sjf2eZu0" + }, + { + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_std", + "dragId": "GW_89DhjIY1" + }, + { + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_mean", + "dragId": "GW_FkhUR8et" + }, + { + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_std", + "dragId": "GW_divyNSbe" + }, + { + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_mean", + "dragId": "GW_23fk1alh" + }, + { + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_std", + "dragId": "GW_KLGBEd9y" + }, + { + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_mean", + "dragId": "GW_O10VLoKQ" + }, + { + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_std", + "dragId": "GW_vWmUQ28X" + }, + { + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "avg_trial_length_in_seconds", + "dragId": "GW_FCNd4Kib" + }, + { + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_day_total_last_session", + "dragId": "GW_YhuRstT3" + }, + { + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_after_session_last_session", + "dragId": "GW_vWUu1n9t" } ], "rows": [ @@ -4841,7 +5513,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_video", - "dragId": "GW_d0snox9X" + "dragId": "GW_d0snox9X", + "offset": 0 }, { "fid": "has_ephys", @@ -4849,7 +5522,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_ephys", - "dragId": "GW_Un7Ab4aD" + "dragId": "GW_Un7Ab4aD", + "offset": 0 }, { "fid": "old_bpod_session", @@ -4857,7 +5531,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "old_bpod_session", - "dragId": "GW_0CRgMaA5" + "dragId": "GW_0CRgMaA5", + "offset": 0 }, { "fid": "institute", @@ -4865,7 +5540,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "institute", - "dragId": "GW_3OcDsx8W" + "dragId": "GW_3OcDsx8W", + "offset": 0 }, { "fid": "rig_type", @@ -4873,7 +5549,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "rig_type", - "dragId": "GW_X89EDH2b" + "dragId": "GW_X89EDH2b", + "offset": 0 }, { "fid": "room", @@ -4881,7 +5558,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "room", - "dragId": "GW_8P3IN1fy" + "dragId": "GW_8P3IN1fy", + "offset": 0 }, { "fid": "hardware", @@ -4889,7 +5567,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "hardware", - "dragId": "GW_i0LKsTka" + "dragId": "GW_i0LKsTka", + "offset": 0 }, { "fid": "data_source", @@ -4897,7 +5576,120 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "data_source", - "dragId": "GW_ovQlp534" + "dragId": "GW_ovQlp534", + "offset": 0 + }, + { + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_1_target_areas", + "dragId": "GW_9PrpMC75" + }, + { + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_2_target_areas", + "dragId": "GW_HOT8iNIe" + }, + { + "fid": "commit_ID", + "name": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "commit_ID", + "dragId": "GW_Ea1uTZjI" + }, + { + "fid": "repo_url", + "name": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "repo_url", + "dragId": "GW_gmohdDjQ" + }, + { + "fid": "current_branch", + "name": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "current_branch", + "dragId": "GW_MdmAk2gD" + }, + { + "fid": "location", + "name": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "location", + "dragId": "GW_VcjzNUa0" + }, + { + "fid": "session_name", + "name": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_name", + "dragId": "GW_UaIgXGLS" + }, + { + "fid": "creation_time", + "name": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "creation_time", + "dragId": "GW_MnqzU7EZ" + }, + { + "fid": "subject_genotype", + "name": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "subject_genotype", + "dragId": "GW_ZlM5B6Xr" + }, + { + "fid": "probes", + "name": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "probes", + "dragId": "GW_zl9HWiag" + }, + { + "fid": "results", + "name": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results", + "dragId": "GW_81045Fy7" + }, + { + "fid": "results_location", + "name": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results_location", + "dragId": "GW_dfAovNBK" + }, + { + "fid": "session_time", + "name": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_time", + "dragId": "GW_Kmd37Ci9" + }, + { + "fid": "docDB_status", + "name": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "docDB_status", + "dragId": "GW_M5VfoIgx" } ], "measures": [ @@ -5984,6 +6776,110 @@ "semanticType": "quantitative", "aggName": "sum", "offset": 0 + }, + { + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_1_calibration_power", + "dragId": "GW_3Llorcbg" + }, + { + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_2_calibration_power", + "dragId": "GW_hf3jikCU" + }, + { + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_mean", + "dragId": "GW_u3c2C7ov" + }, + { + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_std", + "dragId": "GW_aJzjp8Q0" + }, + { + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_mean", + "dragId": "GW_7n1WoQZ5" + }, + { + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_std", + "dragId": "GW_0wLTOYmv" + }, + { + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_mean", + "dragId": "GW_QteqcCMV" + }, + { + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_std", + "dragId": "GW_aD1tAkVE" + }, + { + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_mean", + "dragId": "GW_r9Y0ZK4h" + }, + { + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_std", + "dragId": "GW_rVDjvxsk" + }, + { + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "avg_trial_length_in_seconds", + "dragId": "GW_kI8ioXMw" + }, + { + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_day_total_last_session", + "dragId": "GW_hlUXrOxi" + }, + { + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_after_session_last_session", + "dragId": "GW_h5DtGlBV" } ], "rows": [ @@ -6016,7 +6912,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "data_source", - "dragId": "gw_Xjam" + "dragId": "gw_Xjam", + "offset": 0 } ], "opacity": [], @@ -6242,7 +7139,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_video", - "dragId": "GW_bqFCZrpy" + "dragId": "GW_bqFCZrpy", + "offset": 0 }, { "fid": "has_ephys", @@ -6250,7 +7148,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_ephys", - "dragId": "GW_4xjIydG8" + "dragId": "GW_4xjIydG8", + "offset": 0 }, { "fid": "old_bpod_session", @@ -6258,7 +7157,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "old_bpod_session", - "dragId": "GW_Xm5RBDsM" + "dragId": "GW_Xm5RBDsM", + "offset": 0 }, { "fid": "institute", @@ -6266,7 +7166,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "institute", - "dragId": "GW_Rzr945a3" + "dragId": "GW_Rzr945a3", + "offset": 0 }, { "fid": "rig_type", @@ -6274,7 +7175,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "rig_type", - "dragId": "GW_LUV0XbSs" + "dragId": "GW_LUV0XbSs", + "offset": 0 }, { "fid": "room", @@ -6282,7 +7184,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "room", - "dragId": "GW_ThuEasrW" + "dragId": "GW_ThuEasrW", + "offset": 0 }, { "fid": "hardware", @@ -6290,7 +7193,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "hardware", - "dragId": "GW_lIN7svPj" + "dragId": "GW_lIN7svPj", + "offset": 0 }, { "fid": "data_source", @@ -6298,12 +7202,125 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "data_source", - "dragId": "GW_eUVoHIi3" - } - ], - "measures": [ + "dragId": "GW_eUVoHIi3", + "offset": 0 + }, { - "dragId": "gw_0MWv", + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_1_target_areas", + "dragId": "GW_w0dOkLo3" + }, + { + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_2_target_areas", + "dragId": "GW_EXgLSzrc" + }, + { + "fid": "commit_ID", + "name": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "commit_ID", + "dragId": "GW_NeG7wnOo" + }, + { + "fid": "repo_url", + "name": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "repo_url", + "dragId": "GW_Q04FKTgc" + }, + { + "fid": "current_branch", + "name": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "current_branch", + "dragId": "GW_2PNdtUqj" + }, + { + "fid": "location", + "name": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "location", + "dragId": "GW_3VUBexGR" + }, + { + "fid": "session_name", + "name": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_name", + "dragId": "GW_NCWmQnhD" + }, + { + "fid": "creation_time", + "name": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "creation_time", + "dragId": "GW_hBYySn8v" + }, + { + "fid": "subject_genotype", + "name": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "subject_genotype", + "dragId": "GW_2rsMLXQj" + }, + { + "fid": "probes", + "name": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "probes", + "dragId": "GW_xofgaDjF" + }, + { + "fid": "results", + "name": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results", + "dragId": "GW_1KawEzmu" + }, + { + "fid": "results_location", + "name": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results_location", + "dragId": "GW_Pe8pzxfY" + }, + { + "fid": "session_time", + "name": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_time", + "dragId": "GW_VPxCMeD0" + }, + { + "fid": "docDB_status", + "name": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "docDB_status", + "dragId": "GW_UwrENq8l" + } + ], + "measures": [ + { + "dragId": "gw_0MWv", "fid": "session", "name": "session", "basename": "session", @@ -7385,6 +8402,110 @@ "semanticType": "quantitative", "aggName": "sum", "offset": 0 + }, + { + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_1_calibration_power", + "dragId": "GW_LUY1HwF7" + }, + { + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_2_calibration_power", + "dragId": "GW_kIbj40iH" + }, + { + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_mean", + "dragId": "GW_Wn0wRGZA" + }, + { + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_std", + "dragId": "GW_ExjfwXOh" + }, + { + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_mean", + "dragId": "GW_eL1XpMhk" + }, + { + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_std", + "dragId": "GW_b9W0iceQ" + }, + { + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_mean", + "dragId": "GW_VdRQiLut" + }, + { + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_std", + "dragId": "GW_CTfBbI7U" + }, + { + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_mean", + "dragId": "GW_6XN7kHIp" + }, + { + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_std", + "dragId": "GW_M817fjgY" + }, + { + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "avg_trial_length_in_seconds", + "dragId": "GW_saYn0dXy" + }, + { + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_day_total_last_session", + "dragId": "GW_UbwAOD2a" + }, + { + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_after_session_last_session", + "dragId": "GW_gno3kdVZ" } ], "rows": [ @@ -7644,7 +8765,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_video", - "dragId": "GW_cIj0CiSl" + "dragId": "GW_cIj0CiSl", + "offset": 0 }, { "fid": "has_ephys", @@ -7652,7 +8774,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "has_ephys", - "dragId": "GW_SJwOhAXu" + "dragId": "GW_SJwOhAXu", + "offset": 0 }, { "fid": "old_bpod_session", @@ -7660,7 +8783,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "old_bpod_session", - "dragId": "GW_qFLmGBcS" + "dragId": "GW_qFLmGBcS", + "offset": 0 }, { "fid": "institute", @@ -7668,7 +8792,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "institute", - "dragId": "GW_lK7zi5Vs" + "dragId": "GW_lK7zi5Vs", + "offset": 0 }, { "fid": "rig_type", @@ -7676,7 +8801,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "rig_type", - "dragId": "GW_6G7cNkPO" + "dragId": "GW_6G7cNkPO", + "offset": 0 }, { "fid": "room", @@ -7684,7 +8810,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "room", - "dragId": "GW_IzBiWfqh" + "dragId": "GW_IzBiWfqh", + "offset": 0 }, { "fid": "hardware", @@ -7692,7 +8819,8 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "hardware", - "dragId": "GW_4uXa8HfP" + "dragId": "GW_4uXa8HfP", + "offset": 0 }, { "fid": "data_source", @@ -7700,7 +8828,120 @@ "semanticType": "nominal", "analyticType": "dimension", "basename": "data_source", - "dragId": "GW_FTWywrJo" + "dragId": "GW_FTWywrJo", + "offset": 0 + }, + { + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_1_target_areas", + "dragId": "GW_iRqEvpfD" + }, + { + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_2_target_areas", + "dragId": "GW_4QojDq2S" + }, + { + "fid": "commit_ID", + "name": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "commit_ID", + "dragId": "GW_9TIFnfs0" + }, + { + "fid": "repo_url", + "name": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "repo_url", + "dragId": "GW_UH69ijts" + }, + { + "fid": "current_branch", + "name": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "current_branch", + "dragId": "GW_2PSWrXA4" + }, + { + "fid": "location", + "name": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "location", + "dragId": "GW_tJjT6hxz" + }, + { + "fid": "session_name", + "name": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_name", + "dragId": "GW_5A9JTPY3" + }, + { + "fid": "creation_time", + "name": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "creation_time", + "dragId": "GW_S9gJoeND" + }, + { + "fid": "subject_genotype", + "name": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "subject_genotype", + "dragId": "GW_Tzdx4oWR" + }, + { + "fid": "probes", + "name": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "probes", + "dragId": "GW_iXNEvVex" + }, + { + "fid": "results", + "name": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results", + "dragId": "GW_P43lukcS" + }, + { + "fid": "results_location", + "name": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results_location", + "dragId": "GW_AJZebCyF" + }, + { + "fid": "session_time", + "name": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_time", + "dragId": "GW_o7y6NcA9" + }, + { + "fid": "docDB_status", + "name": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "docDB_status", + "dragId": "GW_nLsjf8Dl" } ], "measures": [ @@ -8787,6 +10028,110 @@ "semanticType": "quantitative", "aggName": "sum", "offset": 0 + }, + { + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_1_calibration_power", + "dragId": "GW_HXW5a9rl" + }, + { + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_2_calibration_power", + "dragId": "GW_xDR3cAH8" + }, + { + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_mean", + "dragId": "GW_T8GCWqlD" + }, + { + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_std", + "dragId": "GW_gGyhQYfE" + }, + { + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_mean", + "dragId": "GW_o1ZP7iWh" + }, + { + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_std", + "dragId": "GW_NPJ8YuLi" + }, + { + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_mean", + "dragId": "GW_4BnltADP" + }, + { + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_std", + "dragId": "GW_VQWA7S5z" + }, + { + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_mean", + "dragId": "GW_GqT7L3cm" + }, + { + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_std", + "dragId": "GW_ZUQSIyKd" + }, + { + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "avg_trial_length_in_seconds", + "dragId": "GW_PWDF0fTe" + }, + { + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_day_total_last_session", + "dragId": "GW_M2DgyClK" + }, + { + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_after_session_last_session", + "dragId": "GW_OASp5evs" } ], "rows": [ @@ -9109,37 +10454,150 @@ "fid": "gw_mea_key_fid", "name": "Measure names", "analyticType": "dimension", - "semanticType": "nominal" - } - ], - "measures": [ - { - "dragId": "gw_DRMe", - "fid": "session", - "name": "session", - "basename": "session", - "analyticType": "measure", - "semanticType": "quantitative", - "aggName": "sum", + "semanticType": "nominal", "offset": 0 }, { - "dragId": "gw_UU2r", - "fid": "nwb_suffix", - "name": "nwb_suffix", - "basename": "nwb_suffix", - "analyticType": "measure", - "semanticType": "quantitative", - "aggName": "sum", - "offset": 0 + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_1_target_areas", + "dragId": "GW_j5dsCEVS" }, { - "dragId": "gw_tO8c", - "fid": "session_run_time_in_min", - "name": "session_run_time_in_min", - "basename": "session_run_time_in_min", - "analyticType": "measure", - "semanticType": "quantitative", + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_2_target_areas", + "dragId": "GW_VesqJ0iL" + }, + { + "fid": "commit_ID", + "name": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "commit_ID", + "dragId": "GW_PiIv0fcO" + }, + { + "fid": "repo_url", + "name": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "repo_url", + "dragId": "GW_DSAW5uQC" + }, + { + "fid": "current_branch", + "name": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "current_branch", + "dragId": "GW_oUYLgHKz" + }, + { + "fid": "location", + "name": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "location", + "dragId": "GW_LMnKwxXt" + }, + { + "fid": "session_name", + "name": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_name", + "dragId": "GW_z01xQ3Uf" + }, + { + "fid": "creation_time", + "name": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "creation_time", + "dragId": "GW_hcSnUOlx" + }, + { + "fid": "subject_genotype", + "name": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "subject_genotype", + "dragId": "GW_clZnz9ky" + }, + { + "fid": "probes", + "name": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "probes", + "dragId": "GW_xZ1NCj4p" + }, + { + "fid": "results", + "name": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results", + "dragId": "GW_pwceaOAY" + }, + { + "fid": "results_location", + "name": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results_location", + "dragId": "GW_Ir5jE3M1" + }, + { + "fid": "session_time", + "name": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_time", + "dragId": "GW_tb5K7eqa" + }, + { + "fid": "docDB_status", + "name": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "docDB_status", + "dragId": "GW_cvAOYqu2" + } + ], + "measures": [ + { + "dragId": "gw_DRMe", + "fid": "session", + "name": "session", + "basename": "session", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_UU2r", + "fid": "nwb_suffix", + "name": "nwb_suffix", + "basename": "nwb_suffix", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_tO8c", + "fid": "session_run_time_in_min", + "name": "session_run_time_in_min", + "basename": "session_run_time_in_min", + "analyticType": "measure", + "semanticType": "quantitative", "aggName": "sum", "offset": 0 }, @@ -10185,7 +11643,8 @@ "op": "one", "params": [], "as": "gw_count_fid" - } + }, + "offset": 0 }, { "dragId": "gw_mea_val_fid", @@ -10193,7 +11652,112 @@ "name": "Measure values", "analyticType": "measure", "semanticType": "quantitative", - "aggName": "sum" + "aggName": "sum", + "offset": 0 + }, + { + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_1_calibration_power", + "dragId": "GW_msBOLpkX" + }, + { + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_2_calibration_power", + "dragId": "GW_HMavrIqy" + }, + { + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_mean", + "dragId": "GW_tIYkvqFS" + }, + { + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_std", + "dragId": "GW_mEkNeojJ" + }, + { + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_mean", + "dragId": "GW_3VwkPU4n" + }, + { + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_std", + "dragId": "GW_0lLDjBSx" + }, + { + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_mean", + "dragId": "GW_58OIkUly" + }, + { + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_std", + "dragId": "GW_6dwV3YF7" + }, + { + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_mean", + "dragId": "GW_W1Ccu42d" + }, + { + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_std", + "dragId": "GW_uDLKr9Nn" + }, + { + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "avg_trial_length_in_seconds", + "dragId": "GW_X8Kv1gEk" + }, + { + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_day_total_last_session", + "dragId": "GW_bWEeJuDP" + }, + { + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_after_session_last_session", + "dragId": "GW_1ezSApcR" } ], "rows": [ @@ -10527,7 +12091,120 @@ "fid": "gw_mea_key_fid", "name": "Measure names", "analyticType": "dimension", - "semanticType": "nominal" + "semanticType": "nominal", + "offset": 0 + }, + { + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_1_target_areas", + "dragId": "GW_ymVSpc0f" + }, + { + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "laser_2_target_areas", + "dragId": "GW_dMX71hqi" + }, + { + "fid": "commit_ID", + "name": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "commit_ID", + "dragId": "GW_rt9HVkOK" + }, + { + "fid": "repo_url", + "name": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "repo_url", + "dragId": "GW_XAQLuPI5" + }, + { + "fid": "current_branch", + "name": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "current_branch", + "dragId": "GW_w0kp6S8Z" + }, + { + "fid": "location", + "name": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "location", + "dragId": "GW_wNrflMYd" + }, + { + "fid": "session_name", + "name": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_name", + "dragId": "GW_3sJryjAp" + }, + { + "fid": "creation_time", + "name": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "creation_time", + "dragId": "GW_UYsijRTk" + }, + { + "fid": "subject_genotype", + "name": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "subject_genotype", + "dragId": "GW_01eOQM86" + }, + { + "fid": "probes", + "name": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "probes", + "dragId": "GW_UP2muXGx" + }, + { + "fid": "results", + "name": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results", + "dragId": "GW_hilYP4bn" + }, + { + "fid": "results_location", + "name": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "results_location", + "dragId": "GW_t2X74MqE" + }, + { + "fid": "session_time", + "name": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "session_time", + "dragId": "GW_MZVIncXB" + }, + { + "fid": "docDB_status", + "name": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "basename": "docDB_status", + "dragId": "GW_AQzIPGsc" } ], "measures": [ @@ -11603,7 +13280,8 @@ "op": "one", "params": [], "as": "gw_count_fid" - } + }, + "offset": 0 }, { "dragId": "gw_mea_val_fid", @@ -11611,7 +13289,112 @@ "name": "Measure values", "analyticType": "measure", "semanticType": "quantitative", - "aggName": "sum" + "aggName": "sum", + "offset": 0 + }, + { + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_1_calibration_power", + "dragId": "GW_K3M6ohIf" + }, + { + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "laser_2_calibration_power", + "dragId": "GW_RpZ6yIfm" + }, + { + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_mean", + "dragId": "GW_j71pcU9m" + }, + { + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Su2022_score_std", + "dragId": "GW_6en19vlz" + }, + { + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_mean", + "dragId": "GW_vg6QWrKF" + }, + { + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Bari2019_score_std", + "dragId": "GW_bi5KONLA" + }, + { + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_mean", + "dragId": "GW_XIHuwZN7" + }, + { + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Hattori2019_score_std", + "dragId": "GW_jF7y4JY8" + }, + { + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_mean", + "dragId": "GW_57jVsSWr" + }, + { + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "logistic_Miller2021_score_std", + "dragId": "GW_A2N4k97z" + }, + { + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "avg_trial_length_in_seconds", + "dragId": "GW_Do9TxM5R" + }, + { + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_day_total_last_session", + "dragId": "GW_gn2Mme4Y" + }, + { + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "semanticType": "quantitative", + "analyticType": "measure", + "basename": "water_after_session_last_session", + "dragId": "GW_T7E20JzU" } ], "rows": [ @@ -11674,5 +13457,1652 @@ }, "visId": "gw_FW26", "name": "All sessions by task" + }, + { + "config": { + "defaultAggregated": true, + "geoms": [ + "bar" + ], + "coordSystem": "generic", + "limit": -1, + "timezoneDisplayOffset": 0 + }, + "encodings": { + "dimensions": [ + { + "dragId": "gw_-skD", + "fid": "subject_id", + "name": "subject_id", + "basename": "subject_id", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_hPfg", + "fid": "session_date", + "name": "session_date", + "basename": "session_date", + "semanticType": "temporal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_4bVy", + "fid": "rig", + "name": "rig", + "basename": "rig", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw__Egt", + "fid": "user_name", + "name": "user_name", + "basename": "user_name", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_1slC", + "fid": "curriculum_name", + "name": "curriculum_name", + "basename": "curriculum_name", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_1D1e", + "fid": "curriculum_version", + "name": "curriculum_version", + "basename": "curriculum_version", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_C_iQ", + "fid": "current_stage_actual", + "name": "current_stage_actual", + "basename": "current_stage_actual", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_cw3e", + "fid": "task", + "name": "task", + "basename": "task", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_Pi_m", + "fid": "notes", + "name": "notes", + "basename": "notes", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_1FcW", + "fid": "experiment_description", + "name": "experiment_description", + "basename": "experiment_description", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_yOvg", + "fid": "session_start_time", + "name": "session_start_time", + "basename": "session_start_time", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_-a1q", + "fid": "session_end_time", + "name": "session_end_time", + "basename": "session_end_time", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_1eg5", + "fid": "laser_1_target_areas", + "name": "laser_1_target_areas", + "basename": "laser_1_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_9Lyk", + "fid": "laser_2_target_areas", + "name": "laser_2_target_areas", + "basename": "laser_2_target_areas", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_uuQV", + "fid": "commit_ID", + "name": "commit_ID", + "basename": "commit_ID", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_4jD6", + "fid": "repo_url", + "name": "repo_url", + "basename": "repo_url", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_3tZp", + "fid": "current_branch", + "name": "current_branch", + "basename": "current_branch", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_IqaC", + "fid": "curriculum_schema_version", + "name": "curriculum_schema_version", + "basename": "curriculum_schema_version", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_Wm0l", + "fid": "if_overriden_by_trainer", + "name": "if_overriden_by_trainer", + "basename": "if_overriden_by_trainer", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_qi1j", + "fid": "if_consistent_within_session", + "name": "if_consistent_within_session", + "basename": "if_consistent_within_session", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_YmXO", + "fid": "h2o", + "name": "h2o", + "basename": "h2o", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_T7jO", + "fid": "institute", + "name": "institute", + "basename": "institute", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw__5m1", + "fid": "rig_type", + "name": "rig_type", + "basename": "rig_type", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_Jq78", + "fid": "room", + "name": "room", + "basename": "room", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_0Lgp", + "fid": "hardware", + "name": "hardware", + "basename": "hardware", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_mMkZ", + "fid": "data_source", + "name": "data_source", + "basename": "data_source", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_d8E7", + "fid": "weekday", + "name": "weekday", + "basename": "weekday", + "semanticType": "quantitative", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_eVV9", + "fid": "location", + "name": "location", + "basename": "location", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_DdNc", + "fid": "session_name", + "name": "session_name", + "basename": "session_name", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_HaRm", + "fid": "creation_time", + "name": "creation_time", + "basename": "creation_time", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_d3vn", + "fid": "subject_genotype", + "name": "subject_genotype", + "basename": "subject_genotype", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw__5m1", + "fid": "probes", + "name": "probes", + "basename": "probes", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_WBOH", + "fid": "results", + "name": "results", + "basename": "results", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_2pFl", + "fid": "results_location", + "name": "results_location", + "basename": "results_location", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_WqIH", + "fid": "session_time", + "name": "session_time", + "basename": "session_time", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_A6Zd", + "fid": "docDB_status", + "name": "docDB_status", + "basename": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + }, + { + "dragId": "gw_mea_key_fid", + "fid": "gw_mea_key_fid", + "name": "Measure names", + "analyticType": "dimension", + "semanticType": "nominal" + } + ], + "measures": [ + { + "dragId": "gw__FIY", + "fid": "nwb_suffix", + "name": "nwb_suffix", + "basename": "nwb_suffix", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Mi0C", + "fid": "session", + "name": "session", + "basename": "session", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_DSqP", + "fid": "session_run_time_in_min", + "name": "session_run_time_in_min", + "basename": "session_run_time_in_min", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw__C4C", + "fid": "water_in_session_foraging", + "name": "water_in_session_foraging", + "basename": "water_in_session_foraging", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_AxXA", + "fid": "water_in_session_manual", + "name": "water_in_session_manual", + "basename": "water_in_session_manual", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_2-h9", + "fid": "water_in_session_total", + "name": "water_in_session_total", + "basename": "water_in_session_total", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_XjAy", + "fid": "water_after_session", + "name": "water_after_session", + "basename": "water_after_session", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_hIDP", + "fid": "water_day_total", + "name": "water_day_total", + "basename": "water_day_total", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Q98V", + "fid": "base_weight", + "name": "base_weight", + "basename": "base_weight", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_ONZ2", + "fid": "target_weight", + "name": "target_weight", + "basename": "target_weight", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_ihQx", + "fid": "target_weight_ratio", + "name": "target_weight_ratio", + "basename": "target_weight_ratio", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_-chx", + "fid": "weight_after", + "name": "weight_after", + "basename": "weight_after", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_tGR3", + "fid": "laser_1_calibration_power", + "name": "laser_1_calibration_power", + "basename": "laser_1_calibration_power", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_H2p6", + "fid": "laser_2_calibration_power", + "name": "laser_2_calibration_power", + "basename": "laser_2_calibration_power", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_TzyQ", + "fid": "weight_after_ratio", + "name": "weight_after_ratio", + "basename": "weight_after_ratio", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_o6Ki", + "fid": "p_reward_sum_mean", + "name": "p_reward_sum_mean", + "basename": "p_reward_sum_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_P3XX", + "fid": "p_reward_sum_std", + "name": "p_reward_sum_std", + "basename": "p_reward_sum_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_klqB", + "fid": "p_reward_sum_median", + "name": "p_reward_sum_median", + "basename": "p_reward_sum_median", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Zs19", + "fid": "p_reward_contrast_mean", + "name": "p_reward_contrast_mean", + "basename": "p_reward_contrast_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_pr7o", + "fid": "p_reware_contrast_median", + "name": "p_reware_contrast_median", + "basename": "p_reware_contrast_median", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_wiQ5", + "fid": "effective_block_length_mean", + "name": "effective_block_length_mean", + "basename": "effective_block_length_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_2WeG", + "fid": "effective_block_length_std", + "name": "effective_block_length_std", + "basename": "effective_block_length_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_GyL1", + "fid": "effective_block_length_median", + "name": "effective_block_length_median", + "basename": "effective_block_length_median", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_t3Kn", + "fid": "effective_block_length_min", + "name": "effective_block_length_min", + "basename": "effective_block_length_min", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_BLmP", + "fid": "effective_block_length_max", + "name": "effective_block_length_max", + "basename": "effective_block_length_max", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_8InL", + "fid": "duration_gocue_stop_mean", + "name": "duration_gocue_stop_mean", + "basename": "duration_gocue_stop_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_0_qz", + "fid": "duration_gocue_stop_std", + "name": "duration_gocue_stop_std", + "basename": "duration_gocue_stop_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_PWwJ", + "fid": "duration_gocue_stop_median", + "name": "duration_gocue_stop_median", + "basename": "duration_gocue_stop_median", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_rMtU", + "fid": "duration_gocue_stop_min", + "name": "duration_gocue_stop_min", + "basename": "duration_gocue_stop_min", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_P5-m", + "fid": "duration_gocue_stop_max", + "name": "duration_gocue_stop_max", + "basename": "duration_gocue_stop_max", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_gl48", + "fid": "duration_delay_period_mean", + "name": "duration_delay_period_mean", + "basename": "duration_delay_period_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_4BSA", + "fid": "duration_delay_period_std", + "name": "duration_delay_period_std", + "basename": "duration_delay_period_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_T897", + "fid": "duration_delay_period_median", + "name": "duration_delay_period_median", + "basename": "duration_delay_period_median", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_fd9i", + "fid": "duration_delay_period_min", + "name": "duration_delay_period_min", + "basename": "duration_delay_period_min", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Lb55", + "fid": "duration_delay_period_max", + "name": "duration_delay_period_max", + "basename": "duration_delay_period_max", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_0QhI", + "fid": "duration_iti_mean", + "name": "duration_iti_mean", + "basename": "duration_iti_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_ZcKj", + "fid": "duration_iti_std", + "name": "duration_iti_std", + "basename": "duration_iti_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_QUop", + "fid": "duration_iti_median", + "name": "duration_iti_median", + "basename": "duration_iti_median", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_ctHz", + "fid": "duration_iti_min", + "name": "duration_iti_min", + "basename": "duration_iti_min", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_qHb-", + "fid": "duration_iti_max", + "name": "duration_iti_max", + "basename": "duration_iti_max", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_6tUu", + "fid": "reward_volume_left_mean", + "name": "reward_volume_left_mean", + "basename": "reward_volume_left_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_jwfA", + "fid": "reward_volume_right_mean", + "name": "reward_volume_right_mean", + "basename": "reward_volume_right_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Cay8", + "fid": "lickspout_movement_range_x", + "name": "lickspout_movement_range_x", + "basename": "lickspout_movement_range_x", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_RL_W", + "fid": "lickspout_movement_range_y", + "name": "lickspout_movement_range_y", + "basename": "lickspout_movement_range_y", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_NFkN", + "fid": "lickspout_movement_range_z", + "name": "lickspout_movement_range_z", + "basename": "lickspout_movement_range_z", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_A4hg", + "fid": "lickspout_initial_pos_x", + "name": "lickspout_initial_pos_x", + "basename": "lickspout_initial_pos_x", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_9NFd", + "fid": "lickspout_initial_pos_y", + "name": "lickspout_initial_pos_y", + "basename": "lickspout_initial_pos_y", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_5fOB", + "fid": "lickspout_initial_pos_z", + "name": "lickspout_initial_pos_z", + "basename": "lickspout_initial_pos_z", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_nKM_", + "fid": "lickspout_median_pos_x", + "name": "lickspout_median_pos_x", + "basename": "lickspout_median_pos_x", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_2Msz", + "fid": "lickspout_median_pos_y", + "name": "lickspout_median_pos_y", + "basename": "lickspout_median_pos_y", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_SORn", + "fid": "lickspout_median_pos_z", + "name": "lickspout_median_pos_z", + "basename": "lickspout_median_pos_z", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Hua1", + "fid": "total_trials_with_autowater", + "name": "total_trials_with_autowater", + "basename": "total_trials_with_autowater", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_OZmI", + "fid": "finished_trials_with_autowater", + "name": "finished_trials_with_autowater", + "basename": "finished_trials_with_autowater", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Aj6b", + "fid": "finished_rate_with_autowater", + "name": "finished_rate_with_autowater", + "basename": "finished_rate_with_autowater", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_nsTV", + "fid": "ignore_rate_with_autowater", + "name": "ignore_rate_with_autowater", + "basename": "ignore_rate_with_autowater", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_bmwm", + "fid": "autowater_collected", + "name": "autowater_collected", + "basename": "autowater_collected", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_WLQ5", + "fid": "autowater_ignored", + "name": "autowater_ignored", + "basename": "autowater_ignored", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_yTaL", + "fid": "total_trials", + "name": "total_trials", + "basename": "total_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_FIT0", + "fid": "finished_trials", + "name": "finished_trials", + "basename": "finished_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_l-tV", + "fid": "ignored_trials", + "name": "ignored_trials", + "basename": "ignored_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_XxO2", + "fid": "finished_rate", + "name": "finished_rate", + "basename": "finished_rate", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_XA-1", + "fid": "ignore_rate", + "name": "ignore_rate", + "basename": "ignore_rate", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_HWHv", + "fid": "reward_trials", + "name": "reward_trials", + "basename": "reward_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_PWF0", + "fid": "reward_rate", + "name": "reward_rate", + "basename": "reward_rate", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw__K4e", + "fid": "foraging_eff", + "name": "foraging_eff", + "basename": "foraging_eff", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Dlyz", + "fid": "foraging_eff_random_seed", + "name": "foraging_eff_random_seed", + "basename": "foraging_eff_random_seed", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_wm6z", + "fid": "foraging_performance", + "name": "foraging_performance", + "basename": "foraging_performance", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_qokS", + "fid": "foraging_performance_random_seed", + "name": "foraging_performance_random_seed", + "basename": "foraging_performance_random_seed", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_ntBN", + "fid": "bias_naive", + "name": "bias_naive", + "basename": "bias_naive", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_P75M", + "fid": "reaction_time_median", + "name": "reaction_time_median", + "basename": "reaction_time_median", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_9gre", + "fid": "reaction_time_mean", + "name": "reaction_time_mean", + "basename": "reaction_time_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_kdL5", + "fid": "early_lick_rate", + "name": "early_lick_rate", + "basename": "early_lick_rate", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_UqLC", + "fid": "invalid_lick_ratio", + "name": "invalid_lick_ratio", + "basename": "invalid_lick_ratio", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_yypT", + "fid": "double_dipping_rate_finished_trials", + "name": "double_dipping_rate_finished_trials", + "basename": "double_dipping_rate_finished_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_MFNn", + "fid": "double_dipping_rate_finished_reward_trials", + "name": "double_dipping_rate_finished_reward_trials", + "basename": "double_dipping_rate_finished_reward_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_ozSI", + "fid": "double_dipping_rate_finished_noreward_trials", + "name": "double_dipping_rate_finished_noreward_trials", + "basename": "double_dipping_rate_finished_noreward_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_nLkL", + "fid": "lick_consistency_mean_finished_trials", + "name": "lick_consistency_mean_finished_trials", + "basename": "lick_consistency_mean_finished_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_ztTr", + "fid": "lick_consistency_mean_finished_reward_trials", + "name": "lick_consistency_mean_finished_reward_trials", + "basename": "lick_consistency_mean_finished_reward_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_7Wgb", + "fid": "lick_consistency_mean_finished_noreward_trials", + "name": "lick_consistency_mean_finished_noreward_trials", + "basename": "lick_consistency_mean_finished_noreward_trials", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_WLSE", + "fid": "logistic_Su2022_RewC_tau", + "name": "logistic_Su2022_RewC_tau", + "basename": "logistic_Su2022_RewC_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_XOBN", + "fid": "logistic_Su2022_RewC_amp", + "name": "logistic_Su2022_RewC_amp", + "basename": "logistic_Su2022_RewC_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_jOTw", + "fid": "logistic_Su2022_UnrC_tau", + "name": "logistic_Su2022_UnrC_tau", + "basename": "logistic_Su2022_UnrC_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_RB6h", + "fid": "logistic_Su2022_UnrC_amp", + "name": "logistic_Su2022_UnrC_amp", + "basename": "logistic_Su2022_UnrC_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_BUi3", + "fid": "logistic_Su2022_bias", + "name": "logistic_Su2022_bias", + "basename": "logistic_Su2022_bias", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_3KSY", + "fid": "logistic_Su2022_score_mean", + "name": "logistic_Su2022_score_mean", + "basename": "logistic_Su2022_score_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_O5RQ", + "fid": "logistic_Su2022_score_std", + "name": "logistic_Su2022_score_std", + "basename": "logistic_Su2022_score_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Kcb8", + "fid": "logistic_Bari2019_RewC_tau", + "name": "logistic_Bari2019_RewC_tau", + "basename": "logistic_Bari2019_RewC_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_OHH7", + "fid": "logistic_Bari2019_RewC_amp", + "name": "logistic_Bari2019_RewC_amp", + "basename": "logistic_Bari2019_RewC_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_Zvoh", + "fid": "logistic_Bari2019_Choice_tau", + "name": "logistic_Bari2019_Choice_tau", + "basename": "logistic_Bari2019_Choice_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_EcNn", + "fid": "logistic_Bari2019_Choice_amp", + "name": "logistic_Bari2019_Choice_amp", + "basename": "logistic_Bari2019_Choice_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_W1pP", + "fid": "logistic_Bari2019_bias", + "name": "logistic_Bari2019_bias", + "basename": "logistic_Bari2019_bias", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_QDtX", + "fid": "logistic_Bari2019_score_mean", + "name": "logistic_Bari2019_score_mean", + "basename": "logistic_Bari2019_score_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_ECXZ", + "fid": "logistic_Bari2019_score_std", + "name": "logistic_Bari2019_score_std", + "basename": "logistic_Bari2019_score_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_KAEG", + "fid": "logistic_Hattori2019_RewC_tau", + "name": "logistic_Hattori2019_RewC_tau", + "basename": "logistic_Hattori2019_RewC_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_mbjo", + "fid": "logistic_Hattori2019_RewC_amp", + "name": "logistic_Hattori2019_RewC_amp", + "basename": "logistic_Hattori2019_RewC_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_OQ_k", + "fid": "logistic_Hattori2019_UnrC_tau", + "name": "logistic_Hattori2019_UnrC_tau", + "basename": "logistic_Hattori2019_UnrC_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_jzBp", + "fid": "logistic_Hattori2019_UnrC_amp", + "name": "logistic_Hattori2019_UnrC_amp", + "basename": "logistic_Hattori2019_UnrC_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_3dKV", + "fid": "logistic_Hattori2019_Choice_tau", + "name": "logistic_Hattori2019_Choice_tau", + "basename": "logistic_Hattori2019_Choice_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_1kyl", + "fid": "logistic_Hattori2019_Choice_amp", + "name": "logistic_Hattori2019_Choice_amp", + "basename": "logistic_Hattori2019_Choice_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_A8KT", + "fid": "logistic_Hattori2019_bias", + "name": "logistic_Hattori2019_bias", + "basename": "logistic_Hattori2019_bias", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_59jI", + "fid": "logistic_Hattori2019_score_mean", + "name": "logistic_Hattori2019_score_mean", + "basename": "logistic_Hattori2019_score_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_iAo-", + "fid": "logistic_Hattori2019_score_std", + "name": "logistic_Hattori2019_score_std", + "basename": "logistic_Hattori2019_score_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_DD4e", + "fid": "logistic_Miller2021_Choice_tau", + "name": "logistic_Miller2021_Choice_tau", + "basename": "logistic_Miller2021_Choice_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_T_tS", + "fid": "logistic_Miller2021_Choice_amp", + "name": "logistic_Miller2021_Choice_amp", + "basename": "logistic_Miller2021_Choice_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_hXfS", + "fid": "logistic_Miller2021_Reward_tau", + "name": "logistic_Miller2021_Reward_tau", + "basename": "logistic_Miller2021_Reward_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_7j43", + "fid": "logistic_Miller2021_Reward_amp", + "name": "logistic_Miller2021_Reward_amp", + "basename": "logistic_Miller2021_Reward_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_9lnx", + "fid": "logistic_Miller2021_Choice_x_Reward_tau", + "name": "logistic_Miller2021_Choice_x_Reward_tau", + "basename": "logistic_Miller2021_Choice_x_Reward_tau", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_2DkC", + "fid": "logistic_Miller2021_Choice_x_Reward_amp", + "name": "logistic_Miller2021_Choice_x_Reward_amp", + "basename": "logistic_Miller2021_Choice_x_Reward_amp", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_oTjr", + "fid": "logistic_Miller2021_bias", + "name": "logistic_Miller2021_bias", + "basename": "logistic_Miller2021_bias", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_XA8o", + "fid": "logistic_Miller2021_score_mean", + "name": "logistic_Miller2021_score_mean", + "basename": "logistic_Miller2021_score_mean", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_hiFI", + "fid": "logistic_Miller2021_score_std", + "name": "logistic_Miller2021_score_std", + "basename": "logistic_Miller2021_score_std", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_fnTE", + "fid": "abs(bias_naive)", + "name": "abs(bias_naive)", + "basename": "abs(bias_naive)", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_iDNN", + "fid": "abs(logistic_Su2022_bias)", + "name": "abs(logistic_Su2022_bias)", + "basename": "abs(logistic_Su2022_bias)", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_of8T", + "fid": "abs(logistic_Bari2019_bias)", + "name": "abs(logistic_Bari2019_bias)", + "basename": "abs(logistic_Bari2019_bias)", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_C_vC", + "fid": "abs(logistic_Hattori2019_bias)", + "name": "abs(logistic_Hattori2019_bias)", + "basename": "abs(logistic_Hattori2019_bias)", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_8Tzv", + "fid": "abs(logistic_Miller2021_bias)", + "name": "abs(logistic_Miller2021_bias)", + "basename": "abs(logistic_Miller2021_bias)", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_NjnD", + "fid": "avg_trial_length_in_seconds", + "name": "avg_trial_length_in_seconds", + "basename": "avg_trial_length_in_seconds", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_k4_r", + "fid": "water_day_total_last_session", + "name": "water_day_total_last_session", + "basename": "water_day_total_last_session", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_VwyX", + "fid": "water_after_session_last_session", + "name": "water_after_session_last_session", + "basename": "water_after_session_last_session", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "offset": 0 + }, + { + "dragId": "gw_count_fid", + "fid": "gw_count_fid", + "name": "Row count", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum", + "computed": true, + "expression": { + "op": "one", + "params": [], + "as": "gw_count_fid" + } + }, + { + "dragId": "gw_mea_val_fid", + "fid": "gw_mea_val_fid", + "name": "Measure values", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "sum" + } + ], + "rows": [ + { + "dragId": "gw_atuY", + "fid": "session", + "name": "session", + "basename": "session", + "analyticType": "measure", + "semanticType": "quantitative", + "aggName": "count", + "offset": 0 + } + ], + "columns": [ + { + "dragId": "gw_HEM4", + "fid": "session_date", + "name": "session_date", + "basename": "session_date", + "semanticType": "temporal", + "analyticType": "dimension", + "offset": 0 + } + ], + "color": [ + { + "dragId": "gw_jXqN", + "fid": "docDB_status", + "name": "docDB_status", + "basename": "docDB_status", + "semanticType": "nominal", + "analyticType": "dimension", + "offset": 0 + } + ], + "opacity": [], + "size": [], + "shape": [], + "radius": [], + "theta": [], + "longitude": [], + "latitude": [], + "geoId": [], + "details": [], + "filters": [ + { + "dragId": "gw_Lyoa", + "fid": "session_date", + "name": "session_date", + "basename": "session_date", + "semanticType": "temporal", + "analyticType": "dimension", + "offset": 0, + "rule": null + } + ], + "text": [] + }, + "layout": { + "showActions": false, + "showTableSummary": false, + "stack": "stack", + "interactiveScale": false, + "zeroScale": true, + "size": { + "mode": "full", + "width": 320, + "height": 200 + }, + "format": {}, + "geoKey": "name", + "resolve": { + "x": false, + "y": false, + "color": false, + "opacity": false, + "shape": false, + "size": false + }, + "scaleIncludeUnmatchedChoropleth": false, + "colorPalette": "set1", + "useSvg": false, + "scale": { + "opacity": {}, + "size": {} + } + }, + "visId": "gw_24NK", + "name": "Check docDB status" } ] \ No newline at end of file From 802d39498c706e4853e5c3389c3e9d7ea209388d Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Fri, 30 Aug 2024 21:56:08 +0000 Subject: [PATCH 12/31] feat: add RL agent and gym task --- ...Playground.py => 1_Learning trajectory.py} | 0 code/pages/4_RL model playground.py | 50 +++++++++++++++++++ environment/Dockerfile | 4 +- requirements.txt | 4 +- 4 files changed, 56 insertions(+), 2 deletions(-) rename code/pages/{1_Playground.py => 1_Learning trajectory.py} (100%) create mode 100644 code/pages/4_RL model playground.py diff --git a/code/pages/1_Playground.py b/code/pages/1_Learning trajectory.py similarity index 100% rename from code/pages/1_Playground.py rename to code/pages/1_Learning trajectory.py diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py new file mode 100644 index 0000000..1008218 --- /dev/null +++ b/code/pages/4_RL model playground.py @@ -0,0 +1,50 @@ +"""Playground for RL models of dynamic foraging +""" + +import streamlit as st +import streamlit_nested_layout + +from aind_behavior_gym.dynamic_foraging.task import CoupledBlockTask +from aind_dynamic_foraging_models.generative_model import ( + ForagerQLearning, ForagerLossCounting, ForagerCollection +) + +try: + st.set_page_config(layout="wide", + page_title='Foraging behavior browser', + page_icon=':mouse2:', + menu_items={ + 'Report a bug': "https://github.com/hanhou/foraging-behavior-browser/issues", + 'About': "Github repo: https://github.com/hanhou/foraging-behavior-browser/" + } + ) +except: + pass + +def app(): + # Initialize the model + forager = ForagerCollection().get_preset_forager("Hattori2019", seed=42) + forager.set_params( + softmax_inverse_temperature=5, + biasL=0, + ) + + # Create the task environment + task = CoupledBlockTask(reward_baiting=True, num_trials=1000, seed=42) + + # Run the model + forager.perform(task) + + # Capture the results + ground_truth_params = forager.params.model_dump() + ground_truth_choice_prob = forager.choice_prob + ground_truth_q_value = forager.q_value + # Get the history + choice_history = forager.get_choice_history() + reward_history = forager.get_reward_history() + + # Plot the session results + fig, axes = forager.plot_session(if_plot_latent=True) + st.pyplot(fig) + +app() \ No newline at end of file diff --git a/environment/Dockerfile b/environment/Dockerfile index 4834dd3..4905d32 100644 --- a/environment/Dockerfile +++ b/environment/Dockerfile @@ -107,7 +107,9 @@ RUN pip install -U --no-cache-dir \ pygwalker==0.4.7 \ aind-data-access-api[docdb]==0.13.0 \ streamlit-dynamic-filters==0.1.9 \ - semver==3.0.2 + semver==3.0.2 \ + aind_dynamic_foraging_models \ + aind_behavior_gym ADD "https://github.com/coder/code-server/releases/download/v4.21.1/code-server-4.21.1-linux-amd64.tar.gz" /.code-server/code-server.tar.gz diff --git a/requirements.txt b/requirements.txt index 2c37526..005f005 100644 --- a/requirements.txt +++ b/requirements.txt @@ -96,4 +96,6 @@ git+https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-automat pygwalker==0.4.7 aind-data-access-api[docdb]==0.13.0 streamlit-dynamic-filters==0.1.9 -semver==3.0.2 \ No newline at end of file +semver==3.0.2 +aind_dynamic_foraging_models +aind_behavior_gym \ No newline at end of file From 4142d801ac53116faec2cc6bef10000335877c09 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Fri, 30 Aug 2024 22:46:29 +0000 Subject: [PATCH 13/31] feat: get agent args --- code/pages/4_RL model playground.py | 51 ++++++++++++++++++++++++++--- environment/Dockerfile | 2 +- requirements.txt | 2 +- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index 1008218..a15fa2f 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -3,11 +3,12 @@ import streamlit as st import streamlit_nested_layout +from typing import get_type_hints, _LiteralGenericAlias +import inspect from aind_behavior_gym.dynamic_foraging.task import CoupledBlockTask -from aind_dynamic_foraging_models.generative_model import ( - ForagerQLearning, ForagerLossCounting, ForagerCollection -) +from aind_dynamic_foraging_models import generative_model +from aind_dynamic_foraging_models.generative_model import ForagerCollection try: st.set_page_config(layout="wide", @@ -21,9 +22,51 @@ except: pass +model_families = { + "Q-learning": "ForagerQLearning", + "Loss counting": "ForagerLossCounting" +} + +def _get_agent_args(agent_class): + type_hints = get_type_hints(agent_class.__init__) + signature = inspect.signature(agent_class.__init__) + + agent_args_options = {} + for arg, type_hint in type_hints.items(): + if isinstance(type_hint, _LiteralGenericAlias): # Check if the type hint is a Literal + # Get options + literal_values = type_hint.__args__ + default_value = signature.parameters[arg].default + + agent_args_options[arg] = {'options': literal_values, 'default': default_value} + return agent_args_options + +def get_arg_params(agent_args_options): + agent_args = {} + # Select agent parameters + for n, arg_name in enumerate(agent_args_options.keys()): + agent_args[arg_name] = st.selectbox( + arg_name, + agent_args_options[arg_name]['options'] + ) + return agent_args + + def app(): + + # A dropdown to select model family + model_family = st.selectbox("Select model family", list(model_families.keys())) + + agent_class = getattr(generative_model, model_families[model_family]) + agent_args_options = _get_agent_args(agent_class) + agent_args = get_arg_params(agent_args_options) + # Initialize the model - forager = ForagerCollection().get_preset_forager("Hattori2019", seed=42) + forager_collection = ForagerCollection() + all_presets = forager_collection.FORAGER_PRESETS.keys() + + forager = forager_collection.get_preset_forager("Hattori2019", seed=42) + forager.set_params( softmax_inverse_temperature=5, biasL=0, diff --git a/environment/Dockerfile b/environment/Dockerfile index 4905d32..1d46388 100644 --- a/environment/Dockerfile +++ b/environment/Dockerfile @@ -108,7 +108,7 @@ RUN pip install -U --no-cache-dir \ aind-data-access-api[docdb]==0.13.0 \ streamlit-dynamic-filters==0.1.9 \ semver==3.0.2 \ - aind_dynamic_foraging_models \ + git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@develop \ aind_behavior_gym diff --git a/requirements.txt b/requirements.txt index 005f005..58ef5fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -97,5 +97,5 @@ pygwalker==0.4.7 aind-data-access-api[docdb]==0.13.0 streamlit-dynamic-filters==0.1.9 semver==3.0.2 -aind_dynamic_foraging_models +git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@develop aind_behavior_gym \ No newline at end of file From 540e03043bd775d52225213e64da5889d993721e Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 01:27:01 +0000 Subject: [PATCH 14/31] feat: add params selectors --- code/pages/4_RL model playground.py | 81 +++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 10 deletions(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index a15fa2f..780c319 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -9,6 +9,7 @@ from aind_behavior_gym.dynamic_foraging.task import CoupledBlockTask from aind_dynamic_foraging_models import generative_model from aind_dynamic_foraging_models.generative_model import ForagerCollection +from aind_dynamic_foraging_models.generative_model.params import ParamsSymbols try: st.set_page_config(layout="wide", @@ -27,7 +28,12 @@ "Loss counting": "ForagerLossCounting" } -def _get_agent_args(agent_class): +para_range_override = { + "biasL": [-5.0, 5.0], + "choice_kernel_relative_weight": [0.0, 2.0], +} + +def _get_agent_args_options(agent_class): type_hints = get_type_hints(agent_class.__init__) signature = inspect.signature(agent_class.__init__) @@ -41,7 +47,38 @@ def _get_agent_args(agent_class): agent_args_options[arg] = {'options': literal_values, 'default': default_value} return agent_args_options -def get_arg_params(agent_args_options): + +def _get_params_options(param_model): + # Get the schema + params_schema = param_model.model_json_schema()["properties"] + + # Extract ge and le constraints + param_options = {} + + for para_name, para_field in params_schema.items(): + default = para_field.get("default", None) + para_desc = para_field.get("description", "") + + if para_name in para_range_override: + para_range = para_range_override[para_name] + else: # Get from pydantic schema + para_range = [-20, 20] # Default range + # Override the range if specified + if "minimum" in para_field: + para_range[0] = para_field["minimum"] + if "maximum" in para_field: + para_range[1] = para_field["maximum"] + para_range = [type(default)(x) for x in para_range] + + param_options[para_name] = dict( + para_range=para_range, + para_default=default, + para_symbol=ParamsSymbols[para_name], + para_desc=para_desc, + ) + return param_options + +def select_agent_args(agent_args_options): agent_args = {} # Select agent parameters for n, arg_name in enumerate(agent_args_options.keys()): @@ -51,27 +88,51 @@ def get_arg_params(agent_args_options): ) return agent_args +def select_params(params_options): + params = {} + # Select agent parameters + for n, para_name in enumerate(params_options.keys()): + para_range = params_options[para_name]['para_range'] + para_default = params_options[para_name]['para_default'] + para_symbol = params_options[para_name]['para_symbol'] + para_desc = params_options[para_name].get('para_desc', '') + + if para_range[0] == para_range[1]: # Fixed parameter + params[para_name] = para_range[0] + st.markdown(f"{para_symbol} ({para_name}) is fixed at {para_range[0]}") + else: + params[para_name] = st.slider( + f"{para_symbol} ({para_name})", + para_range[0], para_range[1], + para_default + ) + return params def app(): - # A dropdown to select model family + # -- Select agent family -- model_family = st.selectbox("Select model family", list(model_families.keys())) + # -- Select agent -- agent_class = getattr(generative_model, model_families[model_family]) - agent_args_options = _get_agent_args(agent_class) - agent_args = get_arg_params(agent_args_options) + agent_args_options = _get_agent_args_options(agent_class) + agent_args = select_agent_args(agent_args_options) - # Initialize the model - forager_collection = ForagerCollection() - all_presets = forager_collection.FORAGER_PRESETS.keys() - - forager = forager_collection.get_preset_forager("Hattori2019", seed=42) + # -- Select agent parameters -- + # Initialize the agent + forager = agent_class(**agent_args) + # Get params options + params_options = _get_params_options(forager.ParamModel) + params = select_params(params_options) forager.set_params( softmax_inverse_temperature=5, biasL=0, ) + # forager_collection = ForagerCollection() + # all_presets = forager_collection.FORAGER_PRESETS.keys() + # Create the task environment task = CoupledBlockTask(reward_baiting=True, num_trials=1000, seed=42) From 0ee18f84336b79fd57ee3487b4bac7b3e6e9b638 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 01:34:24 +0000 Subject: [PATCH 15/31] feat: add seed --- code/pages/4_RL model playground.py | 34 ++++++++++++++++++----------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index 780c319..ccbdfb4 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -108,11 +108,7 @@ def select_params(params_options): ) return params -def app(): - - # -- Select agent family -- - model_family = st.selectbox("Select model family", list(model_families.keys())) - +def set_forager(model_family, seed=42): # -- Select agent -- agent_class = getattr(generative_model, model_families[model_family]) agent_args_options = _get_agent_args_options(agent_class) @@ -120,24 +116,36 @@ def app(): # -- Select agent parameters -- # Initialize the agent - forager = agent_class(**agent_args) + forager = agent_class(**agent_args, seed=seed) # Get params options params_options = _get_params_options(forager.ParamModel) params = select_params(params_options) + # Set the parameters + forager.set_params(**params) + return forager + +def app(): - forager.set_params( - softmax_inverse_temperature=5, - biasL=0, - ) + with st.sidebar: + seed = st.number_input("Random seed", value=42) + + + # -- Select forager family -- + agent_family = st.selectbox("Select model family", list(model_families.keys())) + + # -- Select forager -- + forager = set_forager(agent_family, seed=seed) # forager_collection = ForagerCollection() # all_presets = forager_collection.FORAGER_PRESETS.keys() # Create the task environment - task = CoupledBlockTask(reward_baiting=True, num_trials=1000, seed=42) + task = CoupledBlockTask(reward_baiting=True, num_trials=1000, seed=seed) - # Run the model + # -- Run the model -- forager.perform(task) + + if_plot_latent = st.checkbox("Plot latent variables", value=False) # Capture the results ground_truth_params = forager.params.model_dump() @@ -148,7 +156,7 @@ def app(): reward_history = forager.get_reward_history() # Plot the session results - fig, axes = forager.plot_session(if_plot_latent=True) + fig, axes = forager.plot_session(if_plot_latent=if_plot_latent) st.pyplot(fig) app() \ No newline at end of file From db53f2ad793f726a4d6a907d28130ea0f2edf0bb Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 02:35:03 +0000 Subject: [PATCH 16/31] feat: task selector! --- code/pages/4_RL model playground.py | 105 ++++++++++++++++++++++++---- 1 file changed, 93 insertions(+), 12 deletions(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index ccbdfb4..adf334b 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -6,7 +6,9 @@ from typing import get_type_hints, _LiteralGenericAlias import inspect -from aind_behavior_gym.dynamic_foraging.task import CoupledBlockTask +from aind_behavior_gym.dynamic_foraging.task import ( + CoupledBlockTask, UncoupledBlockTask, RandomWalkTask + ) from aind_dynamic_foraging_models import generative_model from aind_dynamic_foraging_models.generative_model import ForagerCollection from aind_dynamic_foraging_models.generative_model.params import ParamsSymbols @@ -28,6 +30,12 @@ "Loss counting": "ForagerLossCounting" } +task_families = { + "Coupled block task": "CoupledBlockTask", + "Uncoupled block task": "UncoupledBlockTask", + "Random walk task": "RandomWalkTask", +} + para_range_override = { "biasL": [-5.0, 5.0], "choice_kernel_relative_weight": [0.0, 2.0], @@ -108,7 +116,7 @@ def select_params(params_options): ) return params -def set_forager(model_family, seed=42): +def select_forager(model_family, seed=42): # -- Select agent -- agent_class = getattr(generative_model, model_families[model_family]) agent_args_options = _get_agent_args_options(agent_class) @@ -124,23 +132,96 @@ def set_forager(model_family, seed=42): forager.set_params(**params) return forager +def select_task(task_family, reward_baiting, n_trials, seed): + # Task parameters (hard coded for now) + if task_family == "Coupled block task": + block_min, block_max = st.slider("Block length range", 0, 200, [40, 80]) + block_beta = st.slider("Block beta", 0, 100, 20) + p_reward_contrast = st.multiselect( + "Reward contrasts", + options=["1:1", "1:3", "1:6", "1:8"], + default=["1:1", "1:3", "1:6", "1:8"],) + p_reward_sum = st.slider("p_reward sum", 0.0, 1.0, 0.45) + + p_reward_pairs = [] + for contrast in p_reward_contrast: + p1, p2 = contrast.split(":") + p1, p2 = int(p1), int(p2) + p_reward_pairs.append( + [p1 * p_reward_sum / (p1 + p2), + p2 * p_reward_sum / (p1 + p2)] + ) + + # Create task + return CoupledBlockTask( + block_min=block_min, + block_max=block_max, + p_reward_pairs=p_reward_pairs, + block_beta=block_beta, + reward_baiting=reward_baiting, + num_trials=n_trials, + seed=seed) + + if task_family == "Uncoupled block task": + block_min, block_max = st.slider( + "Block length range on each side", 0, 200, [20, 35] + ) + rwd_prob_array = st.selectbox( + "Reward probabilities", + options=[[0.1, 0.5, 0.9], + [0.1, 0.4, 0.7], + [0.1, 0.3, 0.5], + ], + index=0, + ) + return UncoupledBlockTask( + rwd_prob_array=rwd_prob_array, + block_min=block_min, + block_max=block_max, + persev_add=True, + perseverative_limit=4, + max_block_tally=4, + num_trials=n_trials, + seed=seed, + ) + + if task_family == "Random walk task": + p_min, p_max = st.slider("p_reward range", 0.0, 1.0, [0.0, 1.0]) + sigma = st.slider("Random walk $\sigma$", 0.0, 1.0, 0.15) + return RandomWalkTask( + p_min=[p_min, p_min], + p_max=[p_max, p_max], + sigma=[sigma, sigma], + mean=[0, 0], + num_trials=n_trials, + seed=seed, + ) + def app(): with st.sidebar: seed = st.number_input("Random seed", value=42) - # -- Select forager family -- agent_family = st.selectbox("Select model family", list(model_families.keys())) # -- Select forager -- - forager = set_forager(agent_family, seed=seed) + forager = select_forager(agent_family, seed=seed) # forager_collection = ForagerCollection() # all_presets = forager_collection.FORAGER_PRESETS.keys() - # Create the task environment - task = CoupledBlockTask(reward_baiting=True, num_trials=1000, seed=seed) + # -- Select task family -- + task_family = st.selectbox( + "Select task family", + list(task_families.keys()), + index=0, + ) + reward_baiting = st.checkbox("Reward baiting", value=True) + n_trials = st.slider("Number of trials", 100, 5000, 1000) + + # -- Select task -- + task = select_task(task_family, reward_baiting, n_trials, seed) # -- Run the model -- forager.perform(task) @@ -148,12 +229,12 @@ def app(): if_plot_latent = st.checkbox("Plot latent variables", value=False) # Capture the results - ground_truth_params = forager.params.model_dump() - ground_truth_choice_prob = forager.choice_prob - ground_truth_q_value = forager.q_value - # Get the history - choice_history = forager.get_choice_history() - reward_history = forager.get_reward_history() + # ground_truth_params = forager.params.model_dump() + # ground_truth_choice_prob = forager.choice_prob + # ground_truth_q_value = forager.q_value + # # Get the history + # choice_history = forager.get_choice_history() + # reward_history = forager.get_reward_history() # Plot the session results fig, axes = forager.plot_session(if_plot_latent=if_plot_latent) From 1585de20bf4ecd65e173a6565309297eeb47d181 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 02:35:32 +0000 Subject: [PATCH 17/31] build: develop branch of gym --- environment/Dockerfile | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment/Dockerfile b/environment/Dockerfile index 1d46388..33ac566 100644 --- a/environment/Dockerfile +++ b/environment/Dockerfile @@ -109,7 +109,7 @@ RUN pip install -U --no-cache-dir \ streamlit-dynamic-filters==0.1.9 \ semver==3.0.2 \ git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@develop \ - aind_behavior_gym + git+https://github.com/AllenNeuralDynamics/aind-behavior-gym.git@develop ADD "https://github.com/coder/code-server/releases/download/v4.21.1/code-server-4.21.1-linux-amd64.tar.gz" /.code-server/code-server.tar.gz diff --git a/requirements.txt b/requirements.txt index 58ef5fd..6573052 100644 --- a/requirements.txt +++ b/requirements.txt @@ -98,4 +98,4 @@ aind-data-access-api[docdb]==0.13.0 streamlit-dynamic-filters==0.1.9 semver==3.0.2 git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@develop -aind_behavior_gym \ No newline at end of file +git+https://github.com/AllenNeuralDynamics/aind-behavior-gym.git@develop From 4b72779990514866f02dc8df767690a4ef85e8dd Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 02:55:59 +0000 Subject: [PATCH 18/31] feat: widget organization --- code/pages/4_RL model playground.py | 72 ++++++++++++++++++----------- 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index adf334b..1d70557 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -96,7 +96,10 @@ def select_agent_args(agent_args_options): ) return agent_args -def select_params(params_options): +def select_params(forager): + # Get params schema + params_options = _get_params_options(forager.ParamModel) + params = {} # Select agent parameters for n, para_name in enumerate(params_options.keys()): @@ -123,13 +126,8 @@ def select_forager(model_family, seed=42): agent_args = select_agent_args(agent_args_options) # -- Select agent parameters -- - # Initialize the agent + # Initialize the agent`` forager = agent_class(**agent_args, seed=seed) - # Get params options - params_options = _get_params_options(forager.ParamModel) - params = select_params(params_options) - # Set the parameters - forager.set_params(**params) return forager def select_task(task_family, reward_baiting, n_trials, seed): @@ -202,26 +200,45 @@ def app(): with st.sidebar: seed = st.number_input("Random seed", value=42) - # -- Select forager family -- - agent_family = st.selectbox("Select model family", list(model_families.keys())) + st.title("RL model playground") - # -- Select forager -- - forager = select_forager(agent_family, seed=seed) - - # forager_collection = ForagerCollection() - # all_presets = forager_collection.FORAGER_PRESETS.keys() - - # -- Select task family -- - task_family = st.selectbox( - "Select task family", - list(task_families.keys()), - index=0, - ) - reward_baiting = st.checkbox("Reward baiting", value=True) - n_trials = st.slider("Number of trials", 100, 5000, 1000) + col0 = st.columns([1, 1]) + + with col0[0]: + with st.expander("Agent", expanded=True): + col1 = st.columns([1, 2]) + with col1[0]: + # -- Select forager family -- + agent_family = st.selectbox( + "Select agent family", + list(model_families.keys()) + ) + # -- Select forager -- + forager = select_forager(agent_family, seed=seed) + with col1[1]: + # -- Select forager parameters -- + params = select_params(forager) + # Set the parameters + forager.set_params(**params) + + # forager_collection = ForagerCollection() + # all_presets = forager_collection.FORAGER_PRESETS.keys() - # -- Select task -- - task = select_task(task_family, reward_baiting, n_trials, seed) + with col0[1]: + with st.expander("Task", expanded=True): + col1 = st.columns([1, 2]) + with col1[0]: + # -- Select task family -- + task_family = st.selectbox( + "Select task family", + list(task_families.keys()), + index=0, + ) + reward_baiting = st.checkbox("Reward baiting", value=True) + n_trials = st.slider("Number of trials", 100, 5000, 1000) + with col1[1]: + # -- Select task -- + task = select_task(task_family, reward_baiting, n_trials, seed) # -- Run the model -- forager.perform(task) @@ -237,7 +254,8 @@ def app(): # reward_history = forager.get_reward_history() # Plot the session results - fig, axes = forager.plot_session(if_plot_latent=if_plot_latent) - st.pyplot(fig) + fig, axes = forager.plot_session(if_plot_latent=if_plot_latent) + with st.columns([1, 0.5])[0]: + st.pyplot(fig) app() \ No newline at end of file From 97a94a19ad8eed9e98a1061fd41e2f0d5e92689a Mon Sep 17 00:00:00 2001 From: "Hou, Han" Date: Fri, 30 Aug 2024 20:34:31 -0700 Subject: [PATCH 19/31] Upgrade python to 3.9 in publish.yaml --- .github/workflows/publish.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6b70eef..9aed9ba 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -42,10 +42,10 @@ jobs: - uses: actions/checkout@master - name: Pull latest changes run: git pull origin main - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v3 with: - python-version: 3.8 + python-version: 3.9 - name: Configure aws credentials uses: aws-actions/configure-aws-credentials@v2 with: From 150bc6d57280c2c8965ad2ebe0550f4bcdba1927 Mon Sep 17 00:00:00 2001 From: "Hou, Han" Date: Fri, 30 Aug 2024 21:06:58 -0700 Subject: [PATCH 20/31] Update python verison to 3.9 in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1251079..8a3c238 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8-slim +FROM python:3.9-slim WORKDIR /app From 25d6bad90426df9e0c103e649a46c6c03db1ecb2 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 04:36:15 +0000 Subject: [PATCH 21/31] isort --- code/Home.py | 53 ++++++++++----------- code/pages/1_Learning trajectory.py | 11 ++--- code/pages/2_HMM-GLM.py | 6 +-- code/pages/3_AIND data access playground.py | 2 +- code/pages/4_RL model playground.py | 12 ++--- code/util/aws_s3.py | 10 ++-- code/util/fetch_data_docDB.py | 5 +- code/util/foraging_plotly.py | 2 +- code/util/plot_autotrain_manager.py | 7 ++- code/util/population.py | 6 +-- code/util/streamlit.py | 38 +++++++-------- code/util/url_query_helper.py | 8 +--- 12 files changed, 72 insertions(+), 88 deletions(-) diff --git a/code/Home.py b/code/Home.py index 88aaa9a..def5692 100644 --- a/code/Home.py +++ b/code/Home.py @@ -14,40 +14,35 @@ __ver__ = 'v2.5.3' -import pandas as pd -import streamlit as st -import numpy as np import os +import extra_streamlit_components as stx +import numpy as np +import pandas as pd +import streamlit as st import streamlit_nested_layout -from streamlit_plotly_events import plotly_events +from aind_auto_train import __version__ as auto_train_version +from aind_auto_train.auto_train_manager import DynamicForagingAutoTrainManager +from aind_auto_train.curriculum_manager import CurriculumManager from pygwalker.api.streamlit import StreamlitRenderer, init_streamlit_comm -import extra_streamlit_components as stx - -from util.settings import draw_type_mapper_session_level, draw_type_layout_definition - -from util.streamlit import (aggrid_interactive_table_session, - aggrid_interactive_table_curriculum, add_session_filter, data_selector, - add_xy_selector, add_xy_setting, add_auto_train_manager, add_dot_property_mapper, - _plot_population_x_y) -from util.aws_s3 import ( - load_data, - draw_session_plots_quick_preview, - show_session_level_img_by_key_and_prefix, - show_debug_info, -) -from util.url_query_helper import ( - sync_URL_to_session_state, sync_session_state_to_URL, - slider_wrapper_for_url_query, checkbox_wrapper_for_url_query, - multiselect_wrapper_for_url_query, number_input_wrapper_for_url_query, -) - +from streamlit_plotly_events import plotly_events +from util.aws_s3 import (draw_session_plots_quick_preview, load_data, + show_debug_info, + show_session_level_img_by_key_and_prefix) from util.fetch_data_docDB import load_data_from_docDB - -from aind_auto_train.curriculum_manager import CurriculumManager -from aind_auto_train.auto_train_manager import DynamicForagingAutoTrainManager -from aind_auto_train import __version__ as auto_train_version - +from util.settings import (draw_type_layout_definition, + draw_type_mapper_session_level) +from util.streamlit import (_plot_population_x_y, add_auto_train_manager, + add_dot_property_mapper, add_session_filter, + add_xy_selector, add_xy_setting, + aggrid_interactive_table_curriculum, + aggrid_interactive_table_session, data_selector) +from util.url_query_helper import (checkbox_wrapper_for_url_query, + multiselect_wrapper_for_url_query, + number_input_wrapper_for_url_query, + slider_wrapper_for_url_query, + sync_session_state_to_URL, + sync_URL_to_session_state) try: st.set_page_config(layout="wide", diff --git a/code/pages/1_Learning trajectory.py b/code/pages/1_Learning trajectory.py index f495937..9b598dc 100644 --- a/code/pages/1_Learning trajectory.py +++ b/code/pages/1_Learning trajectory.py @@ -1,15 +1,14 @@ +import numpy as np +import pandas as pd +import plotly.graph_objects as go import s3fs import streamlit as st +from plotly.subplots import make_subplots from sklearn.decomposition import PCA from sklearn.preprocessing import StandardScaler -import pandas as pd -import numpy as np -import plotly.graph_objects as go -from plotly.subplots import make_subplots from streamlit_plotly_events import plotly_events - -from util.streamlit import add_session_filter, data_selector from util.aws_s3 import load_data +from util.streamlit import add_session_filter, data_selector ss = st.session_state diff --git a/code/pages/2_HMM-GLM.py b/code/pages/2_HMM-GLM.py index f3e0ac5..9cfd5ed 100644 --- a/code/pages/2_HMM-GLM.py +++ b/code/pages/2_HMM-GLM.py @@ -4,12 +4,12 @@ """ import os import re -import numpy as np -from PIL import Image -import streamlit as st +import numpy as np import s3fs +import streamlit as st import streamlit_nested_layout +from PIL import Image try: st.set_page_config(layout="wide", diff --git a/code/pages/3_AIND data access playground.py b/code/pages/3_AIND data access playground.py index 1ea1089..03324c7 100644 --- a/code/pages/3_AIND data access playground.py +++ b/code/pages/3_AIND data access playground.py @@ -2,9 +2,9 @@ ''' import logging + import streamlit as st from streamlit_dynamic_filters import DynamicFilters - from util.fetch_data_docDB import load_data_from_docDB try: diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index 1d70557..5d02745 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -1,14 +1,14 @@ """Playground for RL models of dynamic foraging """ -import streamlit as st -import streamlit_nested_layout -from typing import get_type_hints, _LiteralGenericAlias import inspect +from typing import _LiteralGenericAlias, get_type_hints -from aind_behavior_gym.dynamic_foraging.task import ( - CoupledBlockTask, UncoupledBlockTask, RandomWalkTask - ) +import streamlit as st +import streamlit_nested_layout +from aind_behavior_gym.dynamic_foraging.task import (CoupledBlockTask, + RandomWalkTask, + UncoupledBlockTask) from aind_dynamic_foraging_models import generative_model from aind_dynamic_foraging_models.generative_model import ForagerCollection from aind_dynamic_foraging_models.generative_model.params import ParamsSymbols diff --git a/code/util/aws_s3.py b/code/util/aws_s3.py index 3728d94..17f258b 100644 --- a/code/util/aws_s3.py +++ b/code/util/aws_s3.py @@ -1,13 +1,13 @@ -from PIL import Image import json -import s3fs import pandas as pd +import s3fs import streamlit as st +from PIL import Image -from .settings import ( - draw_type_layout_definition, draw_type_mapper_session_level, draw_types_quick_preview -) +from .settings import (draw_type_layout_definition, + draw_type_mapper_session_level, + draw_types_quick_preview) # -------------------------------------- data_sources = ['bonsai', 'bpod'] diff --git a/code/util/fetch_data_docDB.py b/code/util/fetch_data_docDB.py index a3ed351..1253014 100644 --- a/code/util/fetch_data_docDB.py +++ b/code/util/fetch_data_docDB.py @@ -1,15 +1,18 @@ """Code to fetch data from docDB by David Feng """ -import pandas as pd import logging import time + +import pandas as pd import semver import streamlit as st + logger = logging.getLogger(__name__) from aind_data_access_api.document_db import MetadataDbClient + @st.cache_data(ttl=3600*12) # Cache the df_docDB up to 12 hours def load_data_from_docDB(): client = load_client() diff --git a/code/util/foraging_plotly.py b/code/util/foraging_plotly.py index c273b60..4a8119f 100644 --- a/code/util/foraging_plotly.py +++ b/code/util/foraging_plotly.py @@ -1,6 +1,6 @@ import numpy as np -import plotly.graph_objs as go import plotly.express as px +import plotly.graph_objs as go def moving_average(a, n=3) : diff --git a/code/util/plot_autotrain_manager.py b/code/util/plot_autotrain_manager.py index bf2ba7a..addf0b9 100644 --- a/code/util/plot_autotrain_manager.py +++ b/code/util/plot_autotrain_manager.py @@ -1,12 +1,11 @@ from datetime import datetime -import streamlit as st import numpy as np -import plotly.graph_objects as go import pandas as pd - -from aind_auto_train.schema.curriculum import TrainingStage +import plotly.graph_objects as go +import streamlit as st from aind_auto_train.plot.curriculum import get_stage_color_mapper +from aind_auto_train.schema.curriculum import TrainingStage def plot_manager_all_progress(manager: 'AutoTrainManager', diff --git a/code/util/population.py b/code/util/population.py index d8dd257..7d9470d 100644 --- a/code/util/population.py +++ b/code/util/population.py @@ -1,13 +1,11 @@ -import numpy as np import matplotlib.pyplot as plt +import numpy as np import pandas as pd -import seaborn as sns import scipy - +import seaborn as sns from statannotations.Annotator import Annotator - def _draw_variable_trial_back(df, beta_name, trials_back, ax=None): if ax is None: _, ax = plt.subplots(1, 1, figsize=(7, 3), constrained_layout=True) diff --git a/code/util/streamlit.py b/code/util/streamlit.py index 2656cfc..e4991a6 100644 --- a/code/util/streamlit.py +++ b/code/util/streamlit.py @@ -1,36 +1,30 @@ +import json from collections import OrderedDict -import pandas as pd -import streamlit as st from datetime import datetime -from st_aggrid import AgGrid, GridOptionsBuilder -from st_aggrid.shared import GridUpdateMode, ColumnsAutoSizeMode, DataReturnMode -from pandas.api.types import ( - is_categorical_dtype, - is_numeric_dtype, - is_string_dtype, -) -import json -import streamlit.components.v1 as components -from streamlit_plotly_events import plotly_events import matplotlib.pyplot as plt +import numpy as np +import pandas as pd import plotly import plotly.express as px -import numpy as np import plotly.graph_objects as go import statsmodels.api as sm +import streamlit as st +import streamlit.components.v1 as components +from pandas.api.types import (is_categorical_dtype, is_numeric_dtype, + is_string_dtype) from scipy.stats import linregress - -from .url_query_helper import ( - checkbox_wrapper_for_url_query, - selectbox_wrapper_for_url_query, - slider_wrapper_for_url_query, - multiselect_wrapper_for_url_query, - get_filter_type, - ) -from .plot_autotrain_manager import plot_manager_all_progress +from st_aggrid import AgGrid, GridOptionsBuilder +from st_aggrid.shared import (ColumnsAutoSizeMode, DataReturnMode, + GridUpdateMode) +from streamlit_plotly_events import plotly_events from .aws_s3 import draw_session_plots_quick_preview +from .plot_autotrain_manager import plot_manager_all_progress +from .url_query_helper import (checkbox_wrapper_for_url_query, get_filter_type, + multiselect_wrapper_for_url_query, + selectbox_wrapper_for_url_query, + slider_wrapper_for_url_query) custom_css = { ".ag-root.ag-unselectable.ag-layout-normal": {"font-size": "15px !important", diff --git a/code/util/url_query_helper.py b/code/util/url_query_helper.py index f2c26d6..55be10b 100644 --- a/code/util/url_query_helper.py +++ b/code/util/url_query_helper.py @@ -1,13 +1,9 @@ import streamlit as st +from pandas.api.types import (is_categorical_dtype, is_datetime64_any_dtype, + is_numeric_dtype) from .settings import draw_type_mapper_session_level -from pandas.api.types import ( - is_categorical_dtype, - is_datetime64_any_dtype, - is_numeric_dtype, -) - # Sync widgets with URL query params # https://blog.streamlit.io/how-streamlit-uses-streamlit-sharing-contextual-apps/ # dict of "key": default pairs From b9d7387da57209f6b2935c7c11c9b54e39612274 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 05:08:15 +0000 Subject: [PATCH 22/31] build: clear up dependencies! --- environment/Dockerfile | 109 +++------------- pip_freeze.txt | 279 ++++++++++++++++++++++++++++------------- requirements.txt | 111 +++------------- 3 files changed, 224 insertions(+), 275 deletions(-) diff --git a/environment/Dockerfile b/environment/Dockerfile index 33ac566..12b6039 100644 --- a/environment/Dockerfile +++ b/environment/Dockerfile @@ -9,105 +9,28 @@ ARG GIT_ACCESS_TOKEN COPY git-askpass / RUN pip install -U --no-cache-dir \ - aiobotocore==2.4.0 \ - aiohttp==3.8.3 \ - aioitertools==0.11.0 \ - aiosignal==1.3.1 \ - altair==4.2.0 \ - async-timeout==4.0.2 \ - attrs==22.1.0 \ - blinker==1.5 \ - botocore==1.27.59 \ - cachetools==5.2.0 \ - certifi \ - charset-normalizer==2.1.1 \ - click==8.1.3 \ - commonmark==0.9.1 \ - contourpy==1.0.6 \ - cycler==0.11.0 \ - decorator==5.1.1 \ - dill==0.3.6 \ - distlib==0.3.4 \ - entrypoints==0.4 \ - extra-streamlit-components==0.1.56 \ - fonttools==4.38.0 \ - frozenlist==1.3.3 \ - fsspec==2022.11.0 \ - gitdb==4.0.9 \ - GitPython==3.1.29 \ - h5py==3.8.0 \ - hdmf==3.5.2 \ - idna==3.4 \ - importlib-metadata==5.0.0 \ - Jinja2==3.1.2 \ - jmespath==1.0.1 \ - jsonschema==4.17.1 \ - kiwisolver==1.4.4 \ - MarkupSafe==2.1.1 \ - matplotlib==3.6.2 \ - multidict==6.0.2 \ - nptyping==2.4.1 \ - numpy==1.23.5 \ - packaging==21.3 \ - pandas==1.5.2 \ - patsy==0.5.3 \ - Pillow==9.3.0 \ - pipenv==2022.5.2 \ - platformdirs==2.5.2 \ - plotly==5.11.0 \ - protobuf==3.20.3 \ - psrecord==1.2 \ - psutil==5.9.4 \ - pyarrow==10.0.1 \ - pydeck==0.8.0 \ - Pygments==2.13.0 \ - pyinstrument==4.1.1 \ - Pympler==1.0.1 \ - pynrrd==1.0.0 \ - pynwb==2.3.1 \ - pyparsing==3.0.9 \ - pyrsistent==0.19.2 \ - python-dateutil==2.8.2 \ - python-decouple==3.6 \ - pytz==2022.6 \ - pytz-deprecation-shim==0.1.0.post0 \ - requests==2.31.0 \ - rich==12.6.0 \ - ruamel.yaml==0.17.21 \ - ruamel.yaml.clib==0.2.7 \ - s3fs==2022.11.0 \ - scipy==1.10.0 \ - scikit-learn==1.3.2 \ - seaborn==0.11.2 \ - six==1.16.0 \ - smmap==5.0.0 \ - statannotations==0.5.0 \ - statsmodels==0.13.5 \ streamlit==1.31.0 \ streamlit-aggrid==0.3.5 \ + streamlit-bokeh3-events==0.1.4 \ + streamlit_dynamic_filters==0.1.9 \ streamlit-nested-layout==0.1.1 \ streamlit-plotly-events==0.0.6 \ - streamlit-profiler==0.2.4 \ - tenacity==8.1.0 \ - toml==0.10.2 \ - toolz==0.12.0 \ - tornado==6.2 \ - typing_extensions==4.9.0 \ - tzdata==2022.6 \ - tzlocal==4.2 \ - urllib3==1.26.13 \ - validators==0.20.0 \ - virtualenv==20.14.1 \ - virtualenv-clone==0.5.7 \ - watchdog==2.1.9 \ - wrapt==1.14.1 \ - yarl==1.8.1 \ - zipp==3.10.0 \ - git+https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-automatic-training.git@main \ pygwalker==0.4.7 \ - aind-data-access-api[docdb]==0.13.0 \ - streamlit-dynamic-filters==0.1.9 \ + extra-streamlit-components==0.1.56 \ + numpy==1.26.4 \ + pandas==2.2.2 \ + matplotlib==3.9.2 \ + seaborn==0.11.2 \ + scipy==1.13.1 \ + plotly==5.11.0 \ + statsmodels==0.13.5 \ + statannotations==0.5.0 \ + scikit-learn==1.5.1 \ semver==3.0.2 \ + s3fs==2024.6.1 \ + pillow==10.4.0 \ + aind-data-access-api[docdb]==0.13.0 \ + git+https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-automatic-training.git@main \ git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@develop \ git+https://github.com/AllenNeuralDynamics/aind-behavior-gym.git@develop diff --git a/pip_freeze.txt b/pip_freeze.txt index c4934d7..6ca262a 100644 --- a/pip_freeze.txt +++ b/pip_freeze.txt @@ -1,145 +1,248 @@ +aind-auto-train @ git+https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-automatic-training.git@ad2a7f3b152f4d9f3379c01a60ffeaa23fcdcf8e +aind-behavior-gym==0.3.6 +aind-data-access-api==0.13.0 +aind-data-schema==0.38.6 +aind-data-schema-models==0.2.3 +aind-dynamic-foraging-basic-analysis==0.2.6 +aind-dynamic-foraging-models @ git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@9f7aa0c763fa0d4fd3abf05787c36fc7addb0d30 +aind-ephys-utils==0.0.15 +aind_codeocean_api==0.5.0 aiobotocore==2.4.0 +aiofiles==22.1.0 aiohttp==3.8.3 aioitertools==0.11.0 aiosignal==1.3.1 +aiosqlite==0.18.0 altair==4.2.0 -anyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1621480387968/work/dist -argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1610522574055/work -async-generator==1.10 +annotated-types==0.7.0 +anyio==3.6.2 +appdirs==1.4.4 +argon2-cffi==21.3.0 +argon2-cffi-bindings==21.2.0 +arrow==1.2.3 +asciitree==0.3.3 +astor==0.8.1 +asttokens==2.2.1 async-timeout==4.0.2 -attrs==22.1.0 -Babel @ file:///home/conda/feedstock_root/build_artifacts/babel_1619719576210/work -backcall @ file:///home/conda/feedstock_root/build_artifacts/backcall_1592338393461/work -backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1618230623929/work -backports.zoneinfo==0.2.1 -bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1612213472466/work +attrs==24.2.0 +Babel==2.12.1 +backcall==0.2.0 +backoff==2.2.1 +bcrypt==4.2.0 +beautifulsoup4==4.11.2 +bleach==6.0.0 blinker==1.5 +bokeh==3.4.3 +boto3==1.24.59 botocore==1.27.59 brotlipy==0.7.0 cachetools==5.2.0 -certifi==2022.9.24 -cffi @ file:///tmp/build/80754af9/cffi_1605538068321/work -chardet @ file:///tmp/build/80754af9/chardet_1605303185383/work +certifi==2024.7.4 +cffi @ file:///opt/conda/conda-bld/cffi_1642701102775/work charset-normalizer==2.1.1 click==8.1.3 -colorama==0.4.4 +cloudpickle==3.0.0 +colorama @ file:///tmp/build/80754af9/colorama_1607707115595/work +comm==0.2.2 commonmark==0.9.1 -conda==4.9.2 -conda-package-handling @ file:///tmp/build/80754af9/conda-package-handling_1603018141399/work -contourpy==1.0.6 -cryptography @ file:///tmp/build/80754af9/cryptography_1605544487601/work -cycler==0.11.0 +conda==4.12.0 +conda-content-trust @ file:///tmp/build/80754af9/conda-content-trust_1617045594566/work +conda-package-handling @ file:///tmp/build/80754af9/conda-package-handling_1649105784853/work +contourpy==1.3.0 +cryptography @ file:///tmp/build/80754af9/cryptography_1639414572950/work +cycler==0.12.1 +dateutils==0.6.12 +debugpy==1.6.6 decorator==5.1.1 -defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work +defusedxml==0.7.1 +dictdiffer==0.9.0 +dill==0.3.6 +distlib==0.3.4 +dnspython==2.6.1 +docopt==0.6.2 +duckdb==0.10.0 entrypoints==0.4 +executing==1.2.0 extra-streamlit-components==0.1.56 -fonttools==4.38.0 +Farama-Notifications==0.0.4 +fasteners==0.19 +fastjsonschema==2.16.3 +filelock==3.15.4 +fonttools==4.53.1 +fqdn==1.5.1 frozenlist==1.3.3 fsspec==2022.11.0 gitdb==4.0.9 GitPython==3.1.29 -h5py==3.9.0 -hdmf==3.8.0 +graphviz==0.20.3 +greenlet==3.0.3 +gw_dsl_parser==0.1.45a6 +gymnasium==0.29.1 +h5py==3.11.0 +hdmf==3.14.3 +hdmf_zarr==0.8.0 idna==3.4 -importlib-metadata==5.0.0 -importlib-resources==6.0.0 -ipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1620912944151/work/dist/ipykernel-5.5.5-py3-none-any.whl -ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1622679232122/work +importlib_metadata==8.4.0 +importlib_resources==6.4.4 +inflection==0.5.1 +ipykernel==6.21.3 +ipython==8.12.3 ipython-genutils==0.2.0 -jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1610146791023/work +ipywidgets==8.1.3 +isoduration==20.11.0 +isort==5.13.2 +jedi==0.18.2 Jinja2==3.1.2 jmespath==1.0.1 -json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1600692310011/work -jsonschema==4.17.1 -jupyter-client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1615693636836/work -jupyter-core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1612125275706/work -jupyter-packaging @ file:///home/conda/feedstock_root/build_artifacts/jupyter-packaging_1613054948399/work -jupyter-server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1621649383518/work -jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1614041538214/work -jupyterlab-git==0.30.0b2 -jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1601375948261/work -jupyterlab-server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server_1622556871679/work -kiwisolver==1.4.4 +joblib==1.4.2 +json5==0.9.11 +jsonpointer==2.3 +jsonschema==4.23.0 +jsonschema-specifications==2023.12.1 +jupyter-events==0.6.3 +jupyter-ydoc==0.2.2 +jupyter_client==8.0.3 +jupyter_core==5.2.0 +jupyter_server==2.4.0 +jupyter_server_fileid==0.8.0 +jupyter_server_terminals==0.4.4 +jupyter_server_ydoc==0.6.1 +jupyterlab==3.6.1 +jupyterlab-pygments==0.2.2 +jupyterlab_server==2.20.0 +jupyterlab_widgets==3.0.11 +kanaries_track==0.0.4 +kiwisolver==1.4.5 MarkupSafe==2.1.1 -matplotlib==3.6.2 -matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1618935594181/work -mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1610112875388/work +matplotlib==3.9.2 +matplotlib-inline==0.1.6 +mistune==2.0.5 +monotonic==1.6 multidict==6.0.2 -nbclassic @ file:///home/conda/feedstock_root/build_artifacts/nbclassic_1621947328608/work -nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1614336084111/work -nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert_1605401836768/work -nbdime==2.1.0 -nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1617383142101/work -nest-asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1617163391303/work -notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1621259862661/work +nbclassic==0.5.3 +nbclient==0.7.2 +nbconvert==7.16.4 +nbformat==5.10.4 +nest-asyncio==1.5.6 +notebook==6.5.3 +notebook_shim==0.2.2 nptyping==2.4.1 -numpy==1.23.5 -packaging==21.3 -pandas==1.5.3 -pandocfilters==1.4.2 -parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1617148930513/work +numcodecs==0.12.1 +numpy==1.26.4 +packaging==24.1 +pandas==2.2.2 +pandocfilters==1.5.0 +paramiko==3.4.0 +parso==0.8.3 +pathlib==1.0.1 patsy==0.5.3 -pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1602535608087/work -pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work -Pillow==9.3.0 -pkgutil-resolve-name==1.3.10 +pexpect==4.8.0 +pickleshare==0.7.5 +pillow==10.4.0 +pipdeptree==2.23.1 +pipenv==2022.5.2 +pipreqs==0.5.0 +platformdirs==2.5.2 plotly==5.11.0 -prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1622586138406/work -prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1616432837031/work +prometheus-client==0.16.0 +prompt-toolkit==3.0.38 protobuf==3.20.3 -ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl +psrecord==1.2 +psutil==5.9.4 +ptyprocess==0.7.0 +pure-eval==0.2.2 pyarrow==10.0.1 pycosat==0.6.3 -pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work +pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work +pydantic==2.8.2 +pydantic-settings==2.4.0 +pydantic_core==2.20.1 pydeck==0.8.0 Pygments==2.13.0 +pygwalker==0.4.7 +pyinstrument==4.1.1 +pymongo==4.3.3 Pympler==1.0.1 +PyNaCl==1.5.0 pynrrd==1.0.0 -pynwb==2.4.0 -pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1605545627475/work -pyparsing==3.0.9 +pynwb==2.8.1 +pyOpenSSL @ file:///opt/conda/conda-bld/pyopenssl_1643788558760/work +pyparsing==3.1.4 pyrsistent==0.19.2 -PySocks @ file:///tmp/build/80754af9/pysocks_1605305779399/work -python-dateutil==2.8.2 +PySocks @ file:///tmp/build/80754af9/pysocks_1605305812635/work +python-dateutil==2.9.0.post0 python-decouple==3.6 -pytz==2022.6 +python-dotenv==1.0.1 +python-json-logger==2.0.7 +pytz==2024.1 pytz-deprecation-shim==0.1.0.post0 -pyzmq @ file:///home/conda/feedstock_root/build_artifacts/pyzmq_1622038460640/work -requests==2.28.1 +PyYAML==6.0 +pyzmq==25.0.0 +referencing==0.35.1 +requests==2.31.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 rich==12.6.0 -ruamel-yaml==0.15.87 -ruamel.yaml.clib==0.2.7 +rpds-py==0.20.0 +ruamel-yaml-conda @ file:///tmp/build/80754af9/ruamel_yaml_1616016711199/work +ruamel.yaml==0.18.6 +ruamel.yaml.clib==0.2.8 s3fs==2022.11.0 -scipy==1.10.0 -seaborn==0.12.2 -semver==2.13.0 -Send2Trash==1.5.0 +s3transfer==0.6.2 +scikit-learn==1.5.1 +scipy==1.13.1 +seaborn==0.11.2 +segment-analytics-python==2.2.3 +semver==3.0.2 +Send2Trash==1.8.0 six==1.16.0 smmap==5.0.0 -sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1610318319305/work +sniffio==1.3.0 +soupsieve==2.4 +SQLAlchemy==2.0.32 +sqlglot==25.10.0 +sshtunnel==0.4.0 +stack-data==0.6.2 statannotations==0.5.0 -statsmodels==0.14.0 -streamlit==1.19.0 -streamlit-aggrid==0.3.3 +statsmodels==0.13.5 +streamlit==1.31.0 +streamlit-aggrid==0.3.5 +streamlit-bokeh3-events==0.1.4 streamlit-nested-layout==0.1.1 streamlit-plotly-events==0.0.6 +streamlit-profiler==0.2.4 +streamlit_dynamic_filters==0.1.9 tenacity==8.1.0 -terminado @ file:///home/conda/feedstock_root/build_artifacts/terminado_1621535185113/work -testpath @ file:///home/conda/feedstock_root/build_artifacts/testpath_1621261527237/work +terminado==0.17.1 +threadpoolctl==3.5.0 +tinycss2==1.2.1 toml==0.10.2 +tomli==2.0.1 toolz==0.12.0 tornado==6.2 -tqdm @ file:///tmp/build/80754af9/tqdm_1605303662894/work -traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1602771532708/work -typing-extensions==4.4.0 -tzdata==2022.6 +tqdm @ file:///opt/conda/conda-bld/tqdm_1647339053476/work +traitlets==5.9.0 +typing_extensions==4.12.2 +tzdata==2024.1 tzlocal==4.2 +uri-template==1.2.0 urllib3==1.26.13 validators==0.20.0 +virtualenv==20.14.1 +virtualenv-clone==0.5.7 +wasmtime==12.0.0 watchdog==2.1.9 -wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1600965781394/work +wcwidth==0.2.6 +webcolors==1.12 webencodings==0.5.1 -websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1610127644879/work +websocket-client==1.5.1 +widgetsnbextension==4.0.11 wrapt==1.14.1 +xarray==2024.7.0 +xyzservices==2024.6.0 +y-py==0.5.9 +yarg==0.1.9 yarl==1.8.1 -zipp==3.10.0 +ypy-websocket==0.8.2 +zarr==2.18.2 +zipp==3.20.1 diff --git a/requirements.txt b/requirements.txt index 6573052..edcd49f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,101 +1,24 @@ -aiobotocore==2.4.0 -aiohttp==3.8.3 -aioitertools==0.11.0 -aiosignal==1.3.1 -altair==4.2.0 -async-timeout==4.0.2 -attrs==22.1.0 -blinker==1.5 -botocore==1.27.59 -cachetools==5.2.0 -certifi -charset-normalizer==2.1.1 -click==8.1.3 -commonmark==0.9.1 -contourpy==1.0.6 -cycler==0.11.0 -decorator==5.1.1 -dill==0.3.6 -distlib==0.3.4 -entrypoints==0.4 -extra-streamlit-components==0.1.56 -fonttools==4.38.0 -frozenlist==1.3.3 -fsspec==2022.11.0 -gitdb==4.0.9 -GitPython==3.1.29 -h5py==3.8.0 -hdmf==3.5.2 -idna==3.4 -importlib-metadata==5.0.0 -Jinja2==3.1.2 -jmespath==1.0.1 -jsonschema==4.17.1 -kiwisolver==1.4.4 -MarkupSafe==2.1.1 -matplotlib==3.6.2 -multidict==6.0.2 -nptyping==2.4.1 -numpy==1.23.5 -packaging==21.3 -pandas==1.5.2 -patsy==0.5.3 -Pillow==9.3.0 -pipenv==2022.5.2 -platformdirs==2.5.2 -plotly==5.11.0 -protobuf==3.20.3 -psrecord==1.2 -psutil==5.9.4 -pyarrow==10.0.1 -pydeck==0.8.0 -Pygments==2.13.0 -pyinstrument==4.1.1 -Pympler==1.0.1 -pynrrd==1.0.0 -pynwb==2.3.1 -pyparsing==3.0.9 -pyrsistent==0.19.2 -python-dateutil==2.8.2 -python-decouple==3.6 -pytz==2022.6 -pytz-deprecation-shim==0.1.0.post0 -requests==2.31.0 -rich==12.6.0 -ruamel.yaml==0.17.21 -ruamel.yaml.clib==0.2.7 -s3fs==2022.11.0 -scipy==1.10.0 -scikit-learn==1.3.2 -seaborn==0.11.2 -six==1.16.0 -smmap==5.0.0 -statannotations==0.5.0 -statsmodels==0.13.5 streamlit==1.31.0 streamlit-aggrid==0.3.5 +streamlit-bokeh3-events==0.1.4 +streamlit_dynamic_filters==0.1.9 streamlit-nested-layout==0.1.1 streamlit-plotly-events==0.0.6 -streamlit-profiler==0.2.4 -tenacity==8.1.0 -toml==0.10.2 -toolz==0.12.0 -tornado==6.2 -typing_extensions==4.9.0 -tzdata==2022.6 -tzlocal==4.2 -urllib3==1.26.13 -validators==0.20.0 -virtualenv==20.14.1 -virtualenv-clone==0.5.7 -watchdog==2.1.9 -wrapt==1.14.1 -yarl==1.8.1 -zipp==3.10.0 -git+https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-automatic-training.git@main pygwalker==0.4.7 -aind-data-access-api[docdb]==0.13.0 -streamlit-dynamic-filters==0.1.9 +extra-streamlit-components==0.1.56 +numpy==1.26.4 +pandas==2.2.2 +matplotlib==3.9.2 +seaborn==0.11.2 +scipy==1.13.1 +plotly==5.11.0 +statsmodels==0.13.5 +statannotations==0.5.0 +scikit-learn==1.5.1 semver==3.0.2 +s3fs==2024.6.1 +pillow==10.4.0 +aind-data-access-api[docdb]==0.13.0 +git+https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-automatic-training.git@main git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@develop -git+https://github.com/AllenNeuralDynamics/aind-behavior-gym.git@develop +git+https://github.com/AllenNeuralDynamics/aind-behavior-gym.git@develop \ No newline at end of file From 6be2d70073b39efd87ecd2684725e63287d9b3a7 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 05:30:25 +0000 Subject: [PATCH 23/31] fix: biasL range --- code/pages/4_RL model playground.py | 1 - 1 file changed, 1 deletion(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index 5d02745..d62dd0f 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -37,7 +37,6 @@ } para_range_override = { - "biasL": [-5.0, 5.0], "choice_kernel_relative_weight": [0.0, 2.0], } From 1590aa67d2a0caf8beabdeb210c6aca021410b74 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 05:30:36 +0000 Subject: [PATCH 24/31] build: dockerfile install from github --- environment/Dockerfile | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/environment/Dockerfile b/environment/Dockerfile index 12b6039..099131e 100644 --- a/environment/Dockerfile +++ b/environment/Dockerfile @@ -8,32 +8,7 @@ ARG GIT_ASKPASS ARG GIT_ACCESS_TOKEN COPY git-askpass / -RUN pip install -U --no-cache-dir \ - streamlit==1.31.0 \ - streamlit-aggrid==0.3.5 \ - streamlit-bokeh3-events==0.1.4 \ - streamlit_dynamic_filters==0.1.9 \ - streamlit-nested-layout==0.1.1 \ - streamlit-plotly-events==0.0.6 \ - pygwalker==0.4.7 \ - extra-streamlit-components==0.1.56 \ - numpy==1.26.4 \ - pandas==2.2.2 \ - matplotlib==3.9.2 \ - seaborn==0.11.2 \ - scipy==1.13.1 \ - plotly==5.11.0 \ - statsmodels==0.13.5 \ - statannotations==0.5.0 \ - scikit-learn==1.5.1 \ - semver==3.0.2 \ - s3fs==2024.6.1 \ - pillow==10.4.0 \ - aind-data-access-api[docdb]==0.13.0 \ - git+https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-automatic-training.git@main \ - git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@develop \ - git+https://github.com/AllenNeuralDynamics/aind-behavior-gym.git@develop - +RUN pip install -r https://raw.githubusercontent.com/AllenNeuralDynamics/foraging-behavior-browser/main/requirements.txt ADD "https://github.com/coder/code-server/releases/download/v4.21.1/code-server-4.21.1-linux-amd64.tar.gz" /.code-server/code-server.tar.gz From 93381f399e0a453bc3e18ce69c98dfbf76c2e605 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 07:00:39 +0000 Subject: [PATCH 25/31] fix: improve legend and fix bug --- code/pages/4_RL model playground.py | 32 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index d62dd0f..6adf39c 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -171,14 +171,20 @@ def select_task(task_family, reward_baiting, n_trials, seed): ], index=0, ) + max_block_tally = st.slider("max block tally", 1, 10, 4) + persev_add = st.checkbox("anti-perseveration", value=True) + perseverative_limit = 3 + if persev_add: + perseverative_limit = st.slider("perseverative limit", 1, 10, 3) return UncoupledBlockTask( rwd_prob_array=rwd_prob_array, block_min=block_min, block_max=block_max, - persev_add=True, - perseverative_limit=4, - max_block_tally=4, + persev_add=persev_add, + perseverative_limit=perseverative_limit, + max_block_tally=max_block_tally, num_trials=n_trials, + reward_baiting=reward_baiting, seed=seed, ) @@ -191,6 +197,7 @@ def select_task(task_family, reward_baiting, n_trials, seed): sigma=[sigma, sigma], mean=[0, 0], num_trials=n_trials, + reward_baiting=reward_baiting, seed=seed, ) @@ -204,12 +211,13 @@ def app(): col0 = st.columns([1, 1]) with col0[0]: - with st.expander("Agent", expanded=True): + st.markdown("#### Select agent ([🤖 aind-dynamic-foraging-models](https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models/blob/develop/src/aind_dynamic_foraging_models/generative_model/foragers.py))") + with st.expander("", expanded=True): col1 = st.columns([1, 2]) with col1[0]: # -- Select forager family -- agent_family = st.selectbox( - "Select agent family", + "Agent type", list(model_families.keys()) ) # -- Select forager -- @@ -224,12 +232,13 @@ def app(): # all_presets = forager_collection.FORAGER_PRESETS.keys() with col0[1]: - with st.expander("Task", expanded=True): + st.markdown("#### Select dynamic foraging task ([🏋️aind-behavior-gym](https://github.com/AllenNeuralDynamics/aind-behavior-gym/tree/develop/src/aind_behavior_gym/dynamic_foraging/task))") + with st.expander("", expanded=True): col1 = st.columns([1, 2]) with col1[0]: # -- Select task family -- task_family = st.selectbox( - "Select task family", + "Task type", list(task_families.keys()), index=0, ) @@ -256,5 +265,14 @@ def app(): fig, axes = forager.plot_session(if_plot_latent=if_plot_latent) with st.columns([1, 0.5])[0]: st.pyplot(fig) + + # Plot block logic + if task_family == "Uncoupled block task": + if_show_block_logic = st.checkbox("Show uncoupled block logic", value=False) + if if_show_block_logic: + fig, ax = task.plot_reward_schedule() + ax[0].legend() + fig.suptitle("Reward schedule") + st.pyplot(fig) app() \ No newline at end of file From d2f7a53363a4d1d13fcfee36ec745d8b584a4d6d Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Sat, 31 Aug 2024 07:13:32 +0000 Subject: [PATCH 26/31] feat: add foraging eff --- code/pages/4_RL model playground.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index 6adf39c..b5bb8a2 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -12,6 +12,7 @@ from aind_dynamic_foraging_models import generative_model from aind_dynamic_foraging_models.generative_model import ForagerCollection from aind_dynamic_foraging_models.generative_model.params import ParamsSymbols +from aind_dynamic_foraging_basic_analysis import compute_foraging_efficiency try: st.set_page_config(layout="wide", @@ -251,7 +252,14 @@ def app(): # -- Run the model -- forager.perform(task) - if_plot_latent = st.checkbox("Plot latent variables", value=False) + # Evaluate the foraging efficiency + foraging_eff, foraging_eff_random_seed = compute_foraging_efficiency( + baited=task.reward_baiting, + choice_history=forager.get_choice_history(), + reward_history=forager.get_reward_history(), + p_reward=forager.get_p_reward(), + random_number=task.random_numbers.T, + ) # Capture the results # ground_truth_params = forager.params.model_dump() @@ -262,8 +270,11 @@ def app(): # reward_history = forager.get_reward_history() # Plot the session results + if_plot_latent = st.checkbox("Plot latent variables", value=False) fig, axes = forager.plot_session(if_plot_latent=if_plot_latent) - with st.columns([1, 0.5])[0]: + + col0 = st.columns([1, 0.5]) + with col0[0]: st.pyplot(fig) # Plot block logic @@ -274,5 +285,9 @@ def app(): ax[0].legend() fig.suptitle("Reward schedule") st.pyplot(fig) + + with col0[1]: + st.write(f"#### **Foraging efficiency**:") + st.write(f"# {foraging_eff_random_seed:.3f}") app() \ No newline at end of file From 62b9b6a6f2634d567414a62696bd02c6a3d5b493 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 5 Sep 2024 02:34:15 +0000 Subject: [PATCH 27/31] feat: refactor and add all forager list --- code/pages/4_RL model playground.py | 72 ++++++++--------------------- 1 file changed, 20 insertions(+), 52 deletions(-) diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index b5bb8a2..bf8196f 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -1,8 +1,6 @@ """Playground for RL models of dynamic foraging """ -import inspect -from typing import _LiteralGenericAlias, get_type_hints import streamlit as st import streamlit_nested_layout @@ -12,6 +10,7 @@ from aind_dynamic_foraging_models import generative_model from aind_dynamic_foraging_models.generative_model import ForagerCollection from aind_dynamic_foraging_models.generative_model.params import ParamsSymbols +from aind_dynamic_foraging_models.generative_model.params.util import get_params_options from aind_dynamic_foraging_basic_analysis import compute_foraging_efficiency try: @@ -37,54 +36,6 @@ "Random walk task": "RandomWalkTask", } -para_range_override = { - "choice_kernel_relative_weight": [0.0, 2.0], -} - -def _get_agent_args_options(agent_class): - type_hints = get_type_hints(agent_class.__init__) - signature = inspect.signature(agent_class.__init__) - - agent_args_options = {} - for arg, type_hint in type_hints.items(): - if isinstance(type_hint, _LiteralGenericAlias): # Check if the type hint is a Literal - # Get options - literal_values = type_hint.__args__ - default_value = signature.parameters[arg].default - - agent_args_options[arg] = {'options': literal_values, 'default': default_value} - return agent_args_options - - -def _get_params_options(param_model): - # Get the schema - params_schema = param_model.model_json_schema()["properties"] - - # Extract ge and le constraints - param_options = {} - - for para_name, para_field in params_schema.items(): - default = para_field.get("default", None) - para_desc = para_field.get("description", "") - - if para_name in para_range_override: - para_range = para_range_override[para_name] - else: # Get from pydantic schema - para_range = [-20, 20] # Default range - # Override the range if specified - if "minimum" in para_field: - para_range[0] = para_field["minimum"] - if "maximum" in para_field: - para_range[1] = para_field["maximum"] - para_range = [type(default)(x) for x in para_range] - - param_options[para_name] = dict( - para_range=para_range, - para_default=default, - para_symbol=ParamsSymbols[para_name], - para_desc=para_desc, - ) - return param_options def select_agent_args(agent_args_options): agent_args = {} @@ -98,7 +49,12 @@ def select_agent_args(agent_args_options): def select_params(forager): # Get params schema - params_options = _get_params_options(forager.ParamModel) + params_options = get_params_options( + forager.ParamModel, + default_range=[-20, 20], + para_range_override={ + "choice_kernel_relative_weight": [0.0, 2.0], + }) params = {} # Select agent parameters @@ -122,7 +78,7 @@ def select_params(forager): def select_forager(model_family, seed=42): # -- Select agent -- agent_class = getattr(generative_model, model_families[model_family]) - agent_args_options = _get_agent_args_options(agent_class) + agent_args_options = ForagerCollection()._get_agent_kwargs_options(agent_class) agent_args = select_agent_args(agent_args_options) # -- Select agent parameters -- @@ -289,5 +245,17 @@ def app(): with col0[1]: st.write(f"#### **Foraging efficiency**:") st.write(f"# {foraging_eff_random_seed:.3f}") + + # --- Show all foragers --- + st.markdown("---") + st.markdown(f"### All available foragers") + df = ForagerCollection().get_all_foragers() + df.drop(columns=["agent_kwargs", "forager"], inplace=True) + first_cols = ["agent_class_name", "preset_name", "params", "n_free_params"] + df = df[ + first_cols + [col for col in df.columns if col not in first_cols] + ] # Reorder + + st.markdown(df.to_markdown(index=True)) app() \ No newline at end of file From 35a72e54916a4e8251b4e76edfd2950bb8538ac2 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 5 Sep 2024 02:50:14 +0000 Subject: [PATCH 28/31] hotfix dependency --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index edcd49f..6159d97 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,6 +18,7 @@ scikit-learn==1.5.1 semver==3.0.2 s3fs==2024.6.1 pillow==10.4.0 +tabulate==0.9.0 aind-data-access-api[docdb]==0.13.0 git+https://github.com/AllenNeuralDynamics/aind-foraging-behavior-bonsai-automatic-training.git@main git+https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-models.git@develop From 9206d88f39e3a4f3df2a82f54cd9d3ead19d1437 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 5 Sep 2024 03:17:36 +0000 Subject: [PATCH 29/31] build --- environment/postInstall | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/environment/postInstall b/environment/postInstall index b81b858..dcb15d9 100755 --- a/environment/postInstall +++ b/environment/postInstall @@ -18,6 +18,11 @@ if [ ! -d "/.vscode/extensions" ] code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension eamodio.gitlens code-server --disable-telemetry --extensions-dir=/.vscode/extensions --install-extension ryanluker.vscode-coverage-gutters + curl -L -o copilot_1.161.zip https://github.com/user-attachments/files/16859733/copilot_1.161.zip + unzip copilot_1.161.zip + code-server --extensions-dir=/.vscode/extensions --install-extension GitHub.copilot-1.161.0.vsix + rm copilot_1.161.zip GitHub.copilot-1.161.0.vsix + else echo "code-server not found" fi \ No newline at end of file From 340f435a21cfaf0c59ae334e87d1f6c682fa2132 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 5 Sep 2024 03:38:56 +0000 Subject: [PATCH 30/31] feat: add footnote --- code/Home.py | 18 ++++++------------ code/__init__.py | 1 + code/pages/2_HMM-GLM.py | 6 +++++- code/pages/4_RL model playground.py | 4 ++++ code/util/streamlit.py | 8 ++++++++ 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/code/Home.py b/code/Home.py index def5692..26072ec 100644 --- a/code/Home.py +++ b/code/Home.py @@ -12,8 +12,6 @@ """ -__ver__ = 'v2.5.3' - import os import extra_streamlit_components as stx @@ -36,7 +34,8 @@ add_dot_property_mapper, add_session_filter, add_xy_selector, add_xy_setting, aggrid_interactive_table_curriculum, - aggrid_interactive_table_session, data_selector) + aggrid_interactive_table_session, data_selector, + add_footnote) from util.url_query_helper import (checkbox_wrapper_for_url_query, multiselect_wrapper_for_url_query, number_input_wrapper_for_url_query, @@ -49,8 +48,8 @@ page_title='Foraging behavior browser', page_icon=':mouse2:', menu_items={ - 'Report a bug': "https://github.com/hanhou/foraging-behavior-browser/issues", - 'About': "Github repo: https://github.com/hanhou/foraging-behavior-browser/" + 'Report a bug': "https://github.com/AllenNeuralDynamics/foraging-behavior-browser/issues", + 'About': "Github repo: https://github.com/AllenNeuralDynamics/foraging-behavior-browser" } ) except: @@ -507,19 +506,14 @@ def app(): add_session_filter(if_bonsai=True, url_query=url_query) data_selector() - - st.markdown('---') - st.markdown(f'#### Han Hou @ 2024 {__ver__}') - st.markdown('[bug report / feature request](https://github.com/AllenNeuralDynamics/foraging-behavior-browser/issues)') + add_footnote() with st.expander('Debug', expanded=False): - if st.button('Reload data from AWS S3'): + if st.button('Clear session state and reload data'): st.cache_data.clear() init() st.rerun() - - with st.container(): # col1, col2 = st.columns([1.5, 1], gap='small') # with col1: diff --git a/code/__init__.py b/code/__init__.py index e69de29..eb9cb3d 100644 --- a/code/__init__.py +++ b/code/__init__.py @@ -0,0 +1 @@ +__ver__ = 'v2.5.4' diff --git a/code/pages/2_HMM-GLM.py b/code/pages/2_HMM-GLM.py index 9cfd5ed..e1b9186 100644 --- a/code/pages/2_HMM-GLM.py +++ b/code/pages/2_HMM-GLM.py @@ -11,6 +11,8 @@ import streamlit_nested_layout from PIL import Image +from util.streamlit import add_footnote + try: st.set_page_config(layout="wide", page_title='Foraging behavior browser', @@ -65,7 +67,9 @@ def app(): if st.button('Reload data from S3'): st.cache_data.clear() st.rerun() - + + add_footnote() + data_folder_selected = widget_data_folder.selectbox('Select Data Folder', data_folders) if data_folder_selected: diff --git a/code/pages/4_RL model playground.py b/code/pages/4_RL model playground.py index bf8196f..9926d3d 100644 --- a/code/pages/4_RL model playground.py +++ b/code/pages/4_RL model playground.py @@ -13,6 +13,9 @@ from aind_dynamic_foraging_models.generative_model.params.util import get_params_options from aind_dynamic_foraging_basic_analysis import compute_foraging_efficiency +from util.streamlit import add_footnote + + try: st.set_page_config(layout="wide", page_title='Foraging behavior browser', @@ -162,6 +165,7 @@ def app(): with st.sidebar: seed = st.number_input("Random seed", value=42) + add_footnote() st.title("RL model playground") diff --git a/code/util/streamlit.py b/code/util/streamlit.py index e4991a6..47bb8ad 100644 --- a/code/util/streamlit.py +++ b/code/util/streamlit.py @@ -2,6 +2,8 @@ from collections import OrderedDict from datetime import datetime +from __init__ import __ver__ + import matplotlib.pyplot as plt import numpy as np import pandas as pd @@ -1110,3 +1112,9 @@ def _add_agg(df_this, x_name, y_name, group, aggr_method, if_use_x_quantile, q_q title_standoff=40, ticks = "outside", tickcolor='black', ticklen=10, tickwidth=2, ticksuffix=' ') return fig + + +def add_footnote(): + st.markdown('---') + st.markdown(f'#### Han Hou @ 2024 {__ver__}') + st.markdown('[bug report / feature request](https://github.com/AllenNeuralDynamics/foraging-behavior-browser/issues)') \ No newline at end of file From 003582ee8b7bc3dbffccb118ce4fdf4a3b8774e4 Mon Sep 17 00:00:00 2001 From: "houhan@gmail.com" Date: Thu, 5 Sep 2024 03:39:07 +0000 Subject: [PATCH 31/31] fix: option.index(default) --- code/util/url_query_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/util/url_query_helper.py b/code/util/url_query_helper.py index 55be10b..e1fa419 100644 --- a/code/util/url_query_helper.py +++ b/code/util/url_query_helper.py @@ -81,7 +81,7 @@ def selectbox_wrapper_for_url_query(st_prefix, label, options, key, default, **k if key in st.session_state else options.index(st.query_params[key]) if key in st.query_params - else default + else options.index(default) ), key=key, **kwargs,