Skip to content

Commit

Permalink
update safeguards
Browse files Browse the repository at this point in the history
  • Loading branch information
nadijagraca committed Dec 5, 2024
1 parent 4e0ddb6 commit 492ee80
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Fixed
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
3 changes: 2 additions & 1 deletion vizro-ai/src/vizro_ai/plot/_response_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ def _test_execute_chart_code(v, values):
fig = custom_chart(data_frame.sample(10, replace=True))
except Exception as e:
raise ValueError(
f"Produced code execution failed the following error: <{e}>. Please check the code and try again."
f"Produced code execution failed the following error: <{e}>. Please check the code and try again, "
f"alternatively try with a more powerful model."
)
assert isinstance(
fig, go.Figure
Expand Down
10 changes: 5 additions & 5 deletions vizro-ai/src/vizro_ai/plot/_utils/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# '__build_class__',
# '__import__',
"abs",
# 'all',
"all",
"any",
# 'ascii',
# 'bin',
Expand All @@ -45,7 +45,7 @@
# 'input',
# 'isinstance',
# 'issubclass',
# 'iter',
"iter",
# 'aiter',
"len",
# 'locals',
Expand All @@ -60,7 +60,7 @@
# 'repr',
"round",
# 'setattr',
# 'sorted',
"sorted",
"sum",
# 'vars',
"None",
Expand All @@ -76,7 +76,7 @@
# 'complex',
"dict",
"enumerate",
# 'filter',
"filter",
"float",
# 'frozenset',
# 'property',
Expand All @@ -85,7 +85,7 @@
"map",
# 'object',
"range",
# 'reversed',
"reversed",
"set",
# 'slice',
# 'staticmethod',
Expand Down

0 comments on commit 492ee80

Please sign in to comment.