Skip to content

Commit

Permalink
force int labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mwalmsley committed Dec 20, 2023
1 parent f17e89f commit f16f773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zoobot/pytorch/datasets/webdataset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def galaxy_to_wds(galaxy: pd.Series, label_cols, transform=None):
if transform is not None:
im = transform(image=im)['image']

labels = json.dumps(galaxy[label_cols].to_dict())
labels = json.dumps(galaxy[label_cols].astype(np.int32).to_dict())
id_str = str(galaxy['id_str'])
return {
"__key__": id_str,
Expand Down

0 comments on commit f16f773

Please sign in to comment.