Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Received Input Validation Errors while running whatif.ipynb notebook for carbon sequestration. #42

Closed
click2cloud-sagarB opened this issue Feb 14, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@click2cloud-sagarB
Copy link

Dear Farmvibes Team,
While running whatif.ipynb notebook I received input validation errors:
1) The scenario must contain at least 2 crop year
2) Input requires at least one simulation scenario (not named 'Current' or 'Baseline').The input parser found 0.

Because of this "farm_ai/carbon_local/carbon_whatif" workflow execution got failed.

Alternate method I tried:
When I add one more year(2021) in scenario.json the workflow executed successfully and I get the value of carbon sequestration as an output.
I have attached modified scenario.json that makes workflow to execute successfully.
I would appreciate your feedback on whether my approach is correct ?

{
    "id": "9a69ef8b-2823-4e5a-b9a9-d3a1eea8dc32",
    "farmId": "d9ceb3b1-1461-4957-b3d1-b5b3af0fd5da",
    "name": "Grape_Table_2022",
    "history": {
        "2022": {
            "crops": [
                {
                    "name": "Alfalfa",
                    "plantedDate": "2022/03/12",
                    "type": "annual crop",
                    "fertilizer": [
                        {
                            "id": "8424a859-8326-4e6b-b0f1-6c482c6df6d8",
                            "date": "2022/03/03",
                            "eep": {
                                "id": 1902,
                                "name": "Slow Release"
                            },
                            "fertilizerType": {
                                "id": 1557,
                                "name": "Calcium Ammonium Nitrate"
                            },
                            "totalFertilizerApplied": "0",
                            "totalNitrogenApplied": "1.0"
                        }
                    ],
                    "harvest": [
                        {
                            "id": "4a40d027-717f-436b-9316-46a32516c798",
                            "gfsrt": "True",
                            "harvestDate": "2022/02/15",
                            "sshrr": "10",
                            "yield": "39"
                        }
                    ],
                    "tillage": [
                        {
                            "id": "63c9e567-2d4a-4d42-8b87-f9c30c40dff4",
                            "date": "2022/04/05",
                            "implement": {
                                "id": 1951,
                                "name": "Intensive Tillage"
                            }
                        }
                    ],
                    "omad": [
                        {
                            "id": "b53c3ba3-c409-4505-b226-2a62547e17c1",
                            "date": "2022/03/03",
                            "type": "Soybean Meal",
                            "amount": "100",
                            "percentN": "0",
                            "CNratio": "1.3"
                        }
                    ]
                }
            ],
            "selected": true
        },
        "2021": {
            "crops": [
                {
                    "name": "Alfalfa",
                    "plantedDate": "2021/06/30",
                    "type": "annual crop",
                    "fertilizer": [
                        {
                            "id": "8424a859-8326-4e6b-b0f1-6c482c6df6d8",
                            "date": "2021/06/30",
                            "eep": {
                                "id": 1902,
                                "name": "Slow Release"
                            },
                            "fertilizerType": {
                                "id": 1557,
                                "name": "Calcium Ammonium Nitrate"
                            },
                            "totalFertilizerApplied": "0",
                            "totalNitrogenApplied": "1.0"
                        }
                    ],
                    "harvest": [
                        {
                            "id": "4a40d027-717f-436b-9316-46a32516c798",
                            "gfsrt": "True",
                            "harvestDate": "2021/09/20",
                            "sshrr": "10",
                            "yield": "39"
                        }
                    ],
                    "tillage": [
                        {
                            "id": "63c9e567-2d4a-4d42-8b87-f9c30c40dff4",
                            "date": "2021/06/15",
                            "implement": {
                                "id": 1951,
                                "name": "Intensive Tillage"
                            }
                        }
                    ],
                    "omad": []
                }
            ],
            "selected": true
        }

    },
    "container": "farm"
}
@rafaspadilha rafaspadilha self-assigned this Feb 14, 2023
@rafaspadilha rafaspadilha added the bug Something isn't working label Feb 14, 2023
@rafaspadilha
Copy link
Contributor

Hi, @click2cloud-sagarB . Thank you for raising this issue.

COMET has recently started requesting two years of data for estimating the amount of carbon sequestrated.

For running the notebook with the example json files provided in the repo, replicating the year in scenario.json will allow the workflow to be executed successfully. In practice, these scenarios should cover farming and cultivation practices considered by the farmer in their analysis.

In the next release, we will alter the contents of the example files provided in the notebook (in particular, scenario.json) to include an additional year of data.

Thank you and the team for raising the issue.

@rafaspadilha
Copy link
Contributor

rafaspadilha commented Feb 16, 2023

Closing this issue due to the fix in PR #44 .
Let us know if you still find any issues while running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants