Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8f944fc
update: shift true label and uid check to backend
Jenish-Lexsi May 25, 2026
fed839c
update: removed uid check with delete file from sdk
Jenish-Lexsi May 25, 2026
629df97
update: removed feature_exclude check with delete file from sdk
Jenish-Lexsi May 25, 2026
03350c5
update: shifted feature encoding check to backend
Jenish-Lexsi May 25, 2026
9f47499
update: shifted tunning strategy check to backend
Jenish-Lexsi May 25, 2026
7f4b525
update: shifted no compute_type check for foundational models
Jenish-Lexsi May 25, 2026
ba9883f
update: removed project type occurences
Jenish-Lexsi May 26, 2026
891c522
update: removed all validation from upload_data_dataconnectors just l…
Jenish-Lexsi May 26, 2026
0f3ade7
update: remove model architecture validation since its there in backend
Jenish-Lexsi May 26, 2026
a47161a
update: removed tag validation from model train and model test
Jenish-Lexsi May 26, 2026
5f8aa73
update: removed pod validation from sdk
Jenish-Lexsi May 26, 2026
7c8d0f7
update: removed xai_method check from sdk
Jenish-Lexsi May 26, 2026
0b19977
update: remove all vaidation checks from upload_model_dataconnectors
Jenish-Lexsi May 26, 2026
fac2081
update: removed dashbaord type validation since its there in backend
Jenish-Lexsi May 26, 2026
9bf11bb
update: removed dashboard type validation
Jenish-Lexsi May 26, 2026
a6febb9
update: removed create trigger checks from sdk, already there in backend
Jenish-Lexsi May 26, 2026
ef9def0
update: removed pod validation from data drift api from sdk
Jenish-Lexsi May 26, 2026
0fdd199
update: removed tag validation from generate dashboard from sdk
Jenish-Lexsi May 26, 2026
b331985
update: shifted remaining 2 checks to backend from generate data drif…
Jenish-Lexsi May 26, 2026
55b5c28
update: removed generate dashboard validation checks from sdk
Jenish-Lexsi May 26, 2026
39867b7
update: removed dashboardtype validation from get_dashboard_log_data …
Jenish-Lexsi May 28, 2026
d460ee8
update: removed model_name validation from model_inference
Jenish-Lexsi May 28, 2026
df12dd6
update: removed validation checks from model_inference
Jenish-Lexsi Jun 1, 2026
042f248
update: removed sdk checks from train_model from sdk
Jenish-Lexsi Jun 1, 2026
0ca7010
update: removed check from delete cases
Jenish-Lexsi Jun 1, 2026
94f73de
update: removed checks from model_inference_settings function
Jenish-Lexsi Jun 1, 2026
0822a65
update: removed create observations checks
Jenish-Lexsi Jun 1, 2026
84379e9
update: removed checks from update observation
Jenish-Lexsi Jun 1, 2026
5e49a17
update: removed checks from create and update policy
Jenish-Lexsi Jun 1, 2026
f8496bb
update: removed train synthetic model checks
Jenish-Lexsi Jun 1, 2026
f06ad94
Merge branch 'main' into remove-sdk-tabular-checks
Jenish-Lexsi Jun 1, 2026
c3fbd3f
fixed pod issue in image
Jenish-Lexsi Jun 1, 2026
1cbe002
update: removed check from remove synthetic model
Jenish-Lexsi Jun 2, 2026
fdc0c45
update: removed synthetic checks
Jenish-Lexsi Jun 2, 2026
323b4ed
update: reverted upload data checks
Jenish-Lexsi Jun 3, 2026
784128e
update: reverted changes for upload data with connectors, upload mode…
Jenish-Lexsi Jun 3, 2026
ec5fd80
update: made pod required in upload model apis
Jenish-Lexsi Jun 3, 2026
34ae786
refactor: drop client-side expression validation, now enforced on bac…
Jenish-Lexsi Jun 4, 2026
d4dd230
fix(data_drift_diagnosis): surface backend error when details is a st…
Jenish-Lexsi Jun 4, 2026
263f803
minor change
Jenish-Lexsi Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lexsi_sdk/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ class ProjectConfig(TypedDict):
"""
Configuration keys required to describe a project.

:param project_type: Project type identifier.
:type project_type: Optional[str]

:param model_name: Model name associated with the project.
:type model_name: Optional[str]

Expand Down
5 changes: 2 additions & 3 deletions lexsi_sdk/core/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,10 @@ def update_inference_model_status(self, model_name: str, activate: bool) -> str:

def model_inference(
self,
pod: str,
tag: Optional[str] = None,
file_name: Optional[str] = None,
model_name: Optional[str] = None,
pod: Optional[str] = None
) -> pd.DataFrame:
"""Run model inference on tag or file_name data. Either tag or file_name is required for running inference

Expand Down Expand Up @@ -622,9 +622,8 @@ def model_inference(
"project_name": self.project_name,
"model_name": model,
"tags": tag,
"instance_type": pod,
}
if pod:
run_model_payload["instance_type"] = pod
if filepath:
run_model_payload["filepath"] = filepath

Expand Down
78 changes: 1 addition & 77 deletions lexsi_sdk/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
GDriveConfig,
SFTPConfig,
)
from lexsi_sdk.common.utils import normalize_time, parse_datetime, parse_float, poll_events
from lexsi_sdk.common.utils import normalize_time, parse_float, poll_events
from lexsi_sdk.common.validation import Validate
import pandas as pd
from lexsi_sdk.common.xai_uris import (
Expand Down Expand Up @@ -46,7 +46,6 @@
LIST_FILEPATHS,
UPLOAD_FILE_DATA_CONNECTORS,
DROPBOX_OAUTH,
VALIDATE_POLICY_URI,
)
import io
from lexsi_sdk.core.alert import Alert
Expand Down Expand Up @@ -1062,78 +1061,3 @@ def build_expression(expression_string):
configuration.append(logical_operators[log_operator])

return configuration, metadata_expression


def validate_configuration(
configuration, params, project_name="", api_client=APIClient(), observations=False
):
"""Validate an expression provided configuration against allowed features/operators.
Raises exceptions for invalid columns/operators/values and can validate observation comparisons.

:param configuration: Configuration token list (from `build_expression`).
:param params: Allowed features/operators payload fetched from the backend.
:param project_name: Project name used for backend validation calls.
:param api_client: API client used for optional backend validation.
:param observations: If True, validate observation column-vs-column comparisons.
:raises Exception: If the configuration is invalid."""
for expression in configuration:
if isinstance(expression, str):
if expression not in ["(", ")", *params.get("logical_operators")]:
raise Exception(f"{expression} not a valid logical operator")

if isinstance(expression, dict):
# validate column name
Validate.value_against_list(
"feature",
expression.get("column"),
list(params.get("features", {}).keys()),
)

# validate operator
Validate.value_against_list(
"condition_operator",
expression.get("expression"),
params.get("condition_operators"),
)

# validate value(s)
expression_value = expression.get("value")
valid_feature_values = params.get("features").get(expression.get("column"))
if observations and isinstance(valid_feature_values, list):
condition_operators = {
"_NOTEQ": "!==",
"_ISEQ": "==",
"_GRT": ">",
"_LST": "<",
}
res = api_client.get(
f"{VALIDATE_POLICY_URI}?project_name={project_name}&column1_name={expression.get('column')}&column2_name={expression.get('value')}&operation={condition_operators[expression.get('expression')]}"
)
if not res.get("success"):
raise Exception(res.get("message"))
if isinstance(valid_feature_values, str):
# if valid_feature_values == "input" and not parse_float(
# expression_value
# ):
# raise Exception(
# f"Invalid value comparison with {expression_value} for {expression.get('column')}"
# )
if valid_feature_values == "datetime" and not parse_datetime(
expression_value
):
raise Exception(
f"Invalid value comparison with {expression_value} for {expression.get('column')}"
)

else:
condition_operators = {
"_NOTEQ": "!==",
"_ISEQ": "==",
"_GRT": ">",
"_LST": "<",
}
res = api_client.get(
f"{VALIDATE_POLICY_URI}?project_name={project_name}&column1_name={expression.get('column')}&column2_name={expression.get('value')}&operation={condition_operators[expression.get('expression')]}"
)
if not res.get("success"):
raise Exception(res.get("message"))
Loading