Skip to content

Commit

Permalink
fix the None.index error
Browse files Browse the repository at this point in the history
  • Loading branch information
geyang committed Sep 28, 2022
1 parent 3f75a6b commit 88835b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dash_server_specs/test_ml_dash.py
Expand Up @@ -300,7 +300,7 @@ def test_series_x_limit(log_dir):
metricsFiles: $metricsFiles,
prefix: $prefix,
k: 10,
xLow: 100,
xLow: 41,
xKey: $xKey,
yKey: $yKey,
yKeys: $yKeys
Expand Down
6 changes: 2 additions & 4 deletions ml_dash/schema/files/series.py
Expand Up @@ -155,8 +155,6 @@ def get_series(metrics_files=tuple(),
dataframes = []
for df in dfs:
if df is None:
df['index'] = df.index
df.set_index('index')
continue
elif x_key is not None:
df.set_index(x_key)
Expand All @@ -181,10 +179,10 @@ def get_series(metrics_files=tuple(),
inds = True
if x_low is not None:
inds &= df[x_key or "index"] >= x_low
print("x_low >>>", inds)
# print("x_low >>>", inds)
if x_high is not None:
inds &= df[x_key or "index"] <= x_high
print("x_high >>>", inds)
# print("x_high >>>", inds)
if inds is not True:
df = df.loc[inds]

Expand Down

0 comments on commit 88835b7

Please sign in to comment.