Draft
Conversation
aornugent
reviewed
Feb 25, 2022
.github/workflows/cml.yaml
Outdated
|
|
||
| jobs: | ||
| run: | ||
| runs-on: [ubuntu-latest] |
There was a problem hiding this comment.
@HarshCasper - I think we can add the FLINTcloud containers here. Docs on Running Jobs in a Container
-runs-on: [ubuntu-latest]
+container: ghcr.io/moja-global/rest_api_gcbm:master
Author
There was a problem hiding this comment.
Yes, I will add the container for the workflow.
|
I've been tinkering with the post-processing tools to get some nice summaries. We can add this step to our CML Action: Then we want to pull out annual summaries. Here's an example that returns the total forest biomass in megatonnes: import sqlite3
import pandas
conn = sqlite3.connect("output/compiled_gcbm_output.db")
query = f"""
SELECT years.year, COALESCE(SUM(i.pool_tc), 0) / 1e6 AS total_biomass_mt
FROM (SELECT DISTINCT year FROM v_age_indicators ORDER BY year) AS years
LEFT JOIN v_pool_indicators i
ON years.year = i.year
WHERE i.indicator = 'Total Biomass'
AND (years.year BETWEEN 1920 AND 2020)
GROUP BY years.year
ORDER BY years.year
"""
df = pd.read_sql_query(query, conn)
ax = df.plot.line("year") # x-axis
ax.figure.savefig('output/total_biomass_mt.png', dpi=300)@yodavo might have some good suggestions for relevant results summaries! |
Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml Update cml.yaml
8f975d8 to
2a89a1c
Compare
1cebe3f to
b7f1fbe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR is a work-in-progress. Current action items include: