Closed peterdudfield closed 3 months ago
We could even use github actions to run the model every dat at 9.00 at one particular site. The results could even been saved to csv and committed to the repo. Then once the live data is available we could compare which model is doing the best
@peterdudfield I'd be keen to look into this!
Running this using github actions is a neat idea. I wonder though whether committing it to the repo would cause the repo size to grow quite a lot. Maybe we could instead save the data as a build artifact?
Yea, it would be nice to keep the repo size down. Could we even push it to the results to huggingface? We even thought of hostel the models there, so might be nice idea to have a huggingface repo with these results.
As far as I understand we would like to take forecast readings at a fixed point in time each day because it's difficult to do a backdated forecast. Then when the live data (pvlive?) is available we can check accuracy.
Just for some more context, what's the difference between this and what you see at app.quartz.solar? It looks like there we already have pv live data overlaid with OCF forecast data.
Hi @mduffin95
This is actualy more of a site level forecast, where as pvlive is a national (and regional) level pv estimation. Hopefully this then explains that this is site level, and app.quartz.solar is more regional and national level
We now have a huggingface repo - https://huggingface.co/openclimatefix/open-source-quartz-solar-forecast/tree/main
This is now merged in, need to run this CI, to check it works
The first CI errored, @mduffin95 can you see why?
https://github.com/openclimatefix/Open-Source-Quartz-Solar-Forecast/actions/runs/10316711744/job/28559504271, is the file now here
Yes my mistake I must not have update some paths after making PR changes. I can fix it this evening.
No problem. Thank you very much
@peterdudfield #177 fixes this!
@peterdudfield The runs are still failing:
Based on the following line, I think it might be to do with the value of the HF_REPO
secret:
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/datasets/***
The secret value should be something like openclimatefix/<dataset-name>
Ive added a print statment and changed it to openclimatefix/open-source-quartz-solar-forecast
The latest error, says log in sucessful, but still an error
This might be becasue the repo is a model
repo, not a dataset
, but im not sure
We might have to use something like this - https://huggingface.co/docs/huggingface_hub/en/guides/upload
forecast.to_csv('temp.csv') # TODO use temp file
api = HfApi(token=hf_token)
api.upload_file(
path_or_fileobj="temp.csv",
path_in_repo=path,
repo_id=hf_repo,
repo_type="model",
)
This seemed to work https://huggingface.co/openclimatefix/open-source-quartz-solar-forecast/tree/main/data/2024/8/12
I can do a PR if you like @mduffin95 , unless you fancy it?
I think instead of switching the API used, we should just be able to change the prefix in hf_upload.py
(line 31).
From the docs:
The repo_type_prefix is datasets/ for datasets, spaces/ for spaces, and models don’t need a prefix in the URL.
I was using a dataset for testing, hence the datasets/
prefix.
Feel free to PR either option though. I'm only free this evening to take a look myself.
Thanks @mduffin95 it ran perfectly this morning -https://huggingface.co/openclimatefix/open-source-quartz-solar-forecast/tree/main/data/2024/8/13
Detailed Description
It would be great to run the module regularly, say evey1 hour and save the results
Context
Possible Implementation