model icon indicating copy to clipboard operation
model copied to clipboard

Add tutorial for creating embeddings over AOI

Open yellowcap opened this issue 1 year ago • 5 comments

Show how to use the clay torchscript encoder to create embeddings over AOI.

yellowcap avatar Jul 22 '24 09:07 yellowcap

Hey @yellowcap, I'm getting:

`--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[19], line 147 137 pixels = transform(pixels) 139 datacube = ( 140 torch.tensor(pixels, dtype=torch.float32, device="cuda"), 141 torch.tensor(np.hstack((week_norm, hour_norm)), dtype=torch.float32, device="cuda"), (...) 144 torch.tensor(gsd, dtype=torch.float32, device="cuda"), 145 ) --> 147 clay_encoder = torch.export.load("clay-v1-encoder.pt").module() 149 # Run the clay encoder 150 with torch.no_grad():

ValueError: invalid literal for int() with base 10: b'5.1'`

when running the notebook. I tried changing to torch.load("clay-v1-encoder.pt").module(), but that didn't seem to help either. Any ideas?

4242psherman4242 avatar Jul 22 '24 22:07 4242psherman4242

@4242psherman4242 which pytorch version are you using to run the notebook?

srmsoumya avatar Jul 24 '24 08:07 srmsoumya

@4242psherman4242 which pytorch version are you using to run the notebook?

Hey @srmsoumya this is using version 2.1.2 of pytorch

4242psherman4242 avatar Jul 24 '24 14:07 4242psherman4242

@4242psherman4242 Can you bump the pytorch version to ~2.3? torch.export is still under development & has breaking changes in minor versions.

srmsoumya avatar Jul 25 '24 06:07 srmsoumya

Hi @yellowcap is it possible to resolve the aforementioned conflicts soon? Would be great to get this super clean way of running inference merged

lauracchen avatar Sep 03 '24 15:09 lauracchen