diff --git a/pkgs/aimstack/asp/boards/audios.py b/pkgs/aimstack/asp/boards/audios.py index 2ee46c9402..5029165f90 100644 --- a/pkgs/aimstack/asp/boards/audios.py +++ b/pkgs/aimstack/asp/boards/audios.py @@ -1,4 +1,3 @@ -from collections.abc import MutableMapping from asp import AudioSequence audios = AudioSequence.filter() @@ -9,7 +8,7 @@ def flatten(dictionary, parent_key='', separator='.'): items = [] for key, value in dictionary.items(): new_key = parent_key + separator + key if parent_key else key - if isinstance(value, MutableMapping): + if isinstance(value, dict): items.extend(flatten(value, new_key, separator=separator).items()) else: items.append((new_key, value)) diff --git a/pkgs/aimstack/asp/boards/run.py b/pkgs/aimstack/asp/boards/run.py index 831ed80d0c..8ca8345c2f 100644 --- a/pkgs/aimstack/asp/boards/run.py +++ b/pkgs/aimstack/asp/boards/run.py @@ -1,6 +1,5 @@ from asp import Run, Metric from itertools import groupby -from collections.abc import MutableMapping import math if 'hash' in session_state: @@ -30,7 +29,7 @@ def flatten(dictionary, parent_key='', separator='.'): flattened = {} for key, value in dictionary.items(): new_key = f"{parent_key}{separator}{key}" if parent_key else key - if isinstance(value, MutableMapping): + if isinstance(value, dict): flattened.update(flatten(value, new_key, separator=separator)) else: flattened[new_key] = value diff --git a/pkgs/aimstack/asp/boards/runs.py b/pkgs/aimstack/asp/boards/runs.py index 95b776c923..64aa6c0c25 100644 --- a/pkgs/aimstack/asp/boards/runs.py +++ b/pkgs/aimstack/asp/boards/runs.py @@ -1,5 +1,4 @@ from asp import Run -from collections.abc import MutableMapping form = ui.form('Search') @@ -12,7 +11,7 @@ def flatten(dictionary, parent_key='', separator='.'): flattened = {} for key, value in dictionary.items(): new_key = f"{parent_key}{separator}{key}" if parent_key else key - if isinstance(value, MutableMapping): + if isinstance(value, dict): flattened.update(flatten(value, new_key, separator=separator)) else: flattened[new_key] = value diff --git a/src/aimcore/web/ui/package.json b/src/aimcore/web/ui/package.json index ed81da5978..92292443d8 100644 --- a/src/aimcore/web/ui/package.json +++ b/src/aimcore/web/ui/package.json @@ -79,8 +79,8 @@ "zustand": "^4.1.1" }, "scripts": { - "start": "cross-env SKIP_PREFLIGHT_CHECK=true node --no-deprecation node_modules/react-scripts/scripts/start.js craco --max_old_space_size=4096 start", - "build": "cross-env SKIP_PREFLIGHT_CHECK=true node --no-deprecation node_modules/react-scripts/scripts/build.js craco --max_old_space_size=4096 build && gzipper c -i js,css,html ./build && node tasks/index-html-template-generator.js", + "start": "cross-env SKIP_PREFLIGHT_CHECK=true node --no-deprecation node_modules/react-scripts/scripts/start.js craco --max_old_space_size=6144 start", + "build": "cross-env SKIP_PREFLIGHT_CHECK=true node --no-deprecation node_modules/react-scripts/scripts/build.js craco --max_old_space_size=6144 build && gzipper c -i js,css,html ./build && node tasks/index-html-template-generator.js", "test": "cross-env SKIP_PREFLIGHT_CHECK=true craco test ", "test:coverage": "cross-env SKIP_PREFLIGHT_CHECK=true craco test --collectCoverage", "test:watch": "cross-env SKIP_PREFLIGHT_CHECK=true craco test --watchAll", diff --git a/src/aimcore/web/ui/src/pages/Board/Board.tsx b/src/aimcore/web/ui/src/pages/Board/Board.tsx index 6afc8b5a7d..e281b446c9 100644 --- a/src/aimcore/web/ui/src/pages/Board/Board.tsx +++ b/src/aimcore/web/ui/src/pages/Board/Board.tsx @@ -116,7 +116,7 @@ any): React.FunctionComponentElement { await micropip.install(lib); } catch (ex) { // eslint-disable-next-line no-console - console.log(ex); + console.warn(ex); } } } @@ -131,7 +131,7 @@ any): React.FunctionComponentElement { })); } catch (ex) { // eslint-disable-next-line no-console - console.log(ex); + console.warn(ex); } } }, [pyodide, pyodideIsLoading, data.code, namespace, registeredPackages]); @@ -151,7 +151,9 @@ def set_session_state(state_slice): `; for (let queryKey in queryKeysForCacheCleaningRef.current) { if (queryKeysForCacheCleaningRef.current[queryKey]) { - resetCode += `query_results_cache.pop('${queryKey}', None) + resetCode += `query_results_cache.pop(${JSON.stringify( + queryKey, + )}, None) `; queryKeysForCacheCleaningRef.current[queryKey] = false; } @@ -170,7 +172,7 @@ def set_session_state(state_slice): return; } // eslint-disable-next-line no-console - console.log(ex); + console.warn(ex); setState((s: any) => ({ ...s, error: ex.message, @@ -263,7 +265,7 @@ def set_session_state(state_slice): return; } // eslint-disable-next-line no-console - console.error(ex); + console.warn(ex); } }, liveUpdateInterval); }