From b4c3e5b8548ac39690279c98cebf0121adbc76fa Mon Sep 17 00:00:00 2001 From: Giorgos Zachariadis Date: Wed, 15 Jun 2022 23:41:16 +0300 Subject: [PATCH] changed str in order to avoid confusions and collisions with Python (#147) --- dalle2_pytorch/vqgan_vae.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dalle2_pytorch/vqgan_vae.py b/dalle2_pytorch/vqgan_vae.py index 4d08389..1c073fd 100644 --- a/dalle2_pytorch/vqgan_vae.py +++ b/dalle2_pytorch/vqgan_vae.py @@ -68,8 +68,8 @@ def group_dict_by_key(cond, d): return_val[ind][key] = d[key] return (*return_val,) -def string_begins_with(prefix, str): - return str.startswith(prefix) +def string_begins_with(prefix, string_input): + return string_input.startswith(prefix) def group_by_key_prefix(prefix, d): return group_dict_by_key(partial(string_begins_with, prefix), d)