Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Blum committed Aug 29, 2023
1 parent 7573f35 commit 478d654
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
16 changes: 12 additions & 4 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@

if endpoints:
df = pd.DataFrame.from_records(endpoints)
df_table = df.drop(columns=["CreationTime",'LastModifiedTime'])
df_table["Creation Time"] = pd.to_datetime(df.LastModifiedTime).dt.strftime('%m/%d/%Y %H:%M:%S')
df_table = df_table.rename(columns={"EndpointName": "Endpoint Name", "EndpointArn": "Endpoint Arn","EndpointStatus": "Endpoint Status"})
df_table = df.drop(columns=["CreationTime", "LastModifiedTime"])
df_table["Creation Time"] = pd.to_datetime(df.LastModifiedTime).dt.strftime(
"%m/%d/%Y %H:%M:%S"
)
df_table = df_table.rename(
columns={
"EndpointName": "Endpoint Name",
"EndpointArn": "Endpoint Arn",
"EndpointStatus": "Endpoint Status",
}
)
st.table(df_table)

else:
st.info('There are currently no endpoints deployed', icon="ℹ️")
st.info("There are currently no endpoints deployed", icon="ℹ️")


# if test_image:
Expand Down
4 changes: 2 additions & 2 deletions app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ def get_sagemaker_endpoints(self) -> dict:
"""
client = self.__boto3_role_session.client("sagemaker")
response = client.list_endpoints(
SortBy='CreationTime',
SortOrder='Descending'
SortBy="CreationTime",
SortOrder="Descending"
# SortBy='Name'|'CreationTime'|'Status',
# SortOrder='Ascending'|'Descending',
# NextToken='string',
Expand Down

0 comments on commit 478d654

Please sign in to comment.