-
-
Notifications
You must be signed in to change notification settings - Fork 6
Speed up GSPDataSource.get_locations()
#305
Comments
Don't we need to make sure there are no nan's for that timeperiod. i.e for each t0 only pick GSP where there is data. |
yeah, that's right, but we could do that as a one-off bit of analysis... i.e. manually check there are no NaNs in GSP data, then we can vastly speed up GSPDataSource.get_locations |
I think this should come before #304 tbh, because this could be a simple win, with minimal code to modify |
In practice, unfortunately it looks like there are NaNs in the GSP data, so we still go round the big (slow) loop:
Some thoughts on next steps:
|
Thats a shame, what about #304 ? |
I'd be keen to find an elegant solution to #305 (this issue) if we can.... parallelism can be complex to think about and debug 🙂 |
Hehe.. good news, @peterdudfield! Your speedy code for |
thats good news - close issue? |
yeah, let's close this for now! Great work! |
If a constant number of GSPs are available across all timesteps then we don't need to go round a slow
for
loop. Instead we can just randomly pick GSPs in one go using something likenp.random.choice(self.metadata["gsp_id"], size=len(t0_datetimes))
The text was updated successfully, but these errors were encountered: