From 9f7c545322200c5025a984c54d977e7de80c099b Mon Sep 17 00:00:00 2001 From: Advitya Gemawat Date: Wed, 24 Jan 2024 15:05:04 -0500 Subject: [PATCH] PL Support on raiwidgets (#2500) * pl support * python lint fixes * Updated rai_core_flask requirement --- raiwidgets/raiwidgets/dashboard.py | 5 ++++- raiwidgets/raiwidgets/responsibleai_dashboard.py | 7 ++++++- raiwidgets/requirements.txt | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/raiwidgets/raiwidgets/dashboard.py b/raiwidgets/raiwidgets/dashboard.py index c70f2d4816..c0b00a9da6 100644 --- a/raiwidgets/raiwidgets/dashboard.py +++ b/raiwidgets/raiwidgets/dashboard.py @@ -61,6 +61,7 @@ def __init__(self, *, port, locale, no_inline_dashboard=False, + is_private_link=False, **kwargs): """Initialize the dashboard.""" @@ -68,7 +69,9 @@ def __init__(self, *, raise ValueError("Required parameters not provided") try: - self._service = FlaskHelper(ip=public_ip, port=port) + self._service = FlaskHelper(ip=public_ip, + port=port, + is_private_link=is_private_link) except Exception as e: self._service = None raise e diff --git a/raiwidgets/raiwidgets/responsibleai_dashboard.py b/raiwidgets/raiwidgets/responsibleai_dashboard.py index fc194258ad..3ac0a11fff 100644 --- a/raiwidgets/raiwidgets/responsibleai_dashboard.py +++ b/raiwidgets/raiwidgets/responsibleai_dashboard.py @@ -29,10 +29,14 @@ class ResponsibleAIDashboard(Dashboard): :param cohort_list: List of cohorts defined by the user for the dashboard. :type cohort_list: List[Cohort] + :param is_private_link: If the dashboard environment is + a private link AML workspace. + :type is_private_link: bool """ def __init__(self, analysis: RAIInsights, public_ip=None, port=None, locale=None, - cohort_list=None, **kwargs): + cohort_list=None, is_private_link=False, + **kwargs): self.input = ResponsibleAIDashboardInput( analysis, cohort_list=cohort_list) @@ -43,6 +47,7 @@ def __init__(self, analysis: RAIInsights, port=port, locale=locale, no_inline_dashboard=True, + is_private_link=is_private_link, **kwargs) def predict(): diff --git a/raiwidgets/requirements.txt b/raiwidgets/requirements.txt index 0bac7cde2a..be5d8cddb7 100644 --- a/raiwidgets/requirements.txt +++ b/raiwidgets/requirements.txt @@ -1,7 +1,7 @@ numpy>=1.17.2,<=1.26.2 pandas>=0.25.1,<2.0.0 scipy>=1.4.1 -rai-core-flask==0.7.2 +rai-core-flask==0.7.3 itsdangerous<=2.1.2 scikit-learn>=0.22.1 lightgbm>=2.0.11