Skip to content

two seemingly identical functions in the same file #458

Open
@dongluw

Description

@dongluw

there are two gen_random_start_ids in tools/utils/utils.py

def gen_random_start_ids(ip_lens):
input_start_ids = []
for ip_len in ip_lens:
start_ids = list(
np.random.randint(low=0,
high=np.iinfo(np.int32).max,
size=ip_len,
dtype=np.int32))
input_start_ids.append(np.array([start_ids]))
return input_start_ids

def gen_random_start_ids(ip_lens):
input_start_ids = []
for ip_len in ip_lens:
start_ids = list(
np.random.randint(low=0,
high=np.iinfo(np.int32).max,
size=ip_len,
dtype=np.int32))
input_start_ids.append(np.array([start_ids]))
return input_start_ids

Metadata

Metadata

Assignees

Labels

triagedIssue has been triaged by maintainers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions