Skip to content

Commit

Permalink
ignore any errors when dropping the _aws_url column
Browse files Browse the repository at this point in the history
  • Loading branch information
brifordwylie committed Nov 10, 2024
1 parent c6830ad commit 4c5a2ae
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/sageworks/web_views/artifacts_web_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def incoming_data_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
s3_data_df["Name"] = hyperlinked_names

# Drop the AWS URL column and return the dataframe
s3_data_df.drop(columns=["_aws_url"], inplace=True)
s3_data_df.drop(columns=["_aws_url"], inplace=True, errors="ignore")
return s3_data_df

def glue_jobs_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
Expand Down Expand Up @@ -72,7 +72,7 @@ def glue_jobs_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
glue_df["Name"] = hyperlinked_names

# Drop the AWS URL column and return the dataframe
glue_df.drop(columns=["_aws_url"], inplace=True)
glue_df.drop(columns=["_aws_url"], inplace=True, errors="ignore")
return glue_df

def data_sources_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
Expand Down Expand Up @@ -103,7 +103,7 @@ def data_sources_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
data_df["Name"] = hyperlinked_names

# Drop the AWS URL column and return the dataframe
data_df.drop(columns=["_aws_url"], inplace=True)
data_df.drop(columns=["_aws_url"], inplace=True, errors="ignore")
return data_df

def feature_sets_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
Expand Down Expand Up @@ -134,7 +134,7 @@ def feature_sets_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
feature_df["Feature Group"] = hyperlinked_names

# Drop the AWS URL column and return the dataframe
feature_df.drop(columns=["_aws_url"], inplace=True)
feature_df.drop(columns=["_aws_url"], inplace=True, errors="ignore")
return feature_df

def models_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
Expand All @@ -159,6 +159,9 @@ def models_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
if add_hyperlinks:
model_df["Model Group"] = model_df["Model Group"].map(lambda x: self.hyperlinks(x, "models", ""))

# Drop the AWS URL column
model_df.drop(columns=["_aws_url"], inplace=True, errors="ignore")

# Add Health Symbols to the Model Group Name
if "Health" in model_df.columns:
model_df["Health"] = model_df["Health"].map(lambda x: tag_symbols(x))
Expand Down Expand Up @@ -187,6 +190,9 @@ def endpoints_summary(self, add_hyperlinks: bool = True) -> pd.DataFrame:
if add_hyperlinks:
endpoint_df["Name"] = endpoint_df["Name"].map(lambda x: self.hyperlinks(x, "endpoints", ""))

# Drop the AWS URL column
endpoint_df.drop(columns=["_aws_url"], inplace=True, errors="ignore")

# Add Health Symbols to the Endpoint Name
if "Health" in endpoint_df.columns:
endpoint_df["Health"] = endpoint_df["Health"].map(lambda x: tag_symbols(x))
Expand Down

0 comments on commit 4c5a2ae

Please sign in to comment.