Skip to content

Commit

Permalink
Merge pull request #1895 from luarss/master
Browse files Browse the repository at this point in the history
[Autotuner] fix adarray bug
  • Loading branch information
vvbandeira authored Apr 1, 2024
2 parents 1bf751d + bf24c34 commit 39e26cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flow/util/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def apply_condition(config, data):
if dp_pad_step > 1:
config['CELL_PAD_IN_SITES_DETAIL_PLACEMENT'] = tune.sample_from(
lambda spec: tune.choice(
np.adarray.tolist(
np.ndarray.tolist(
np.arange(
dp_pad_min,
spec.config.CELL_PAD_IN_SITES_GLOBAL_PLACEMENT +
Expand All @@ -248,15 +248,15 @@ def read_tune(this):
if this['step'] == 1:
return tune.randint(min_, max_)
return tune.choice(
np.adarray.tolist(
np.ndarray.tolist(
np.arange(min_,
max_,
this['step'])))
if this['type'] == 'float':
if this['step'] == 0:
return tune.uniform(min_, max_)
return tune.choice(
np.adarray.tolist(
np.ndarray.tolist(
np.arange(min_,
max_,
this['step'])))
Expand All @@ -280,7 +280,7 @@ def read_tune_ax(name, this):
elif this['type'] == 'float':
if this['step'] == 1:
dict_["type"] = "choice"
dict_["values"] = tune.choice(np.adarray.tolist(
dict_["values"] = tune.choice(np.ndarray.tolist(
np.arange(min_,
max_,
this['step'])))
Expand Down

0 comments on commit 39e26cd

Please sign in to comment.