Skip to content

Commit

Permalink
pathos fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbuniat committed Nov 17, 2020
2 parents 52839c7 + 63612dd commit b9bd53d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions examples/basic.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from hub import Dataset, features
import numpy as np


def main():
# Tag is set {Username}/{Dataset}
tag = "davitb/basic11"
Expand All @@ -16,6 +15,15 @@ def main():
},
)

# Create dataset
ds = Dataset(
tag,
shape=(4,),
schema={
"image": features.Tensor((512, 512), dtype="float"),
"label": features.Tensor((512, 512), dtype="float"),
},
)

# Upload Data
ds["image"][:] = np.ones((4, 512, 512))
Expand All @@ -27,4 +35,4 @@ def main():
print(ds["image"][0].compute())

if __name__ == "__main__":
main()
main()
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ lmdb==1.0.0
boto3==1.16.10
azure-storage-blob==12.5.0
tqdm==4.51
pathos>=2.2
pathos>=0.2.2

0 comments on commit b9bd53d

Please sign in to comment.