ML-for-B-E / nevergrad

A Python toolbox for performing gradient-free optimization
https://facebookresearch.github.io/nevergrad/
MIT License
2 stars 0 forks source link

Where to find the ec3.soil to use for irrigation experiment? #3

Closed akouete-kpakpo closed 2 years ago

akouete-kpakpo commented 2 years ago

Context

When I use https://github.com/ajwdewit/pcse_notebooks/blob/master/data/soil/ec3.soil, I have a pcse.exceptions.PCSEError: Failed to parse the CABO file!.

Which file should I use?

akouete-kpakpo commented 2 years ago
akouete-kpakpo commented 2 years ago

1st hypothesis retained: the file downloaded is of wrong format.

somehow the download with urllib got a corrupted file. when I copy the content on remote and paste it in local file then it works

image

akouete-kpakpo commented 2 years ago

Actually I get the full content of the Github page and not the content I am interested in. Have to write a parser with beautifulsoup to get the useful content.

akouete-kpakpo commented 2 years ago

After fixing the data problem, now I have

---------------------------------------------------------------------------
PCSEError                                 Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 YAMLCropDataProvider()

File ~/repository/github/nevergrad/venv/lib/python3.8/site-packages/pcse/fileinput/yaml_cropdataprovider.py:132, in YAMLCropDataProvider.__init__(self, fpath, repository, force_reload)
    130 else:
    131     msg = "No path or URL specified where to find YAML crop parameter files"
--> 132     raise exc.PCSEError(msg)
    134 with open(self._get_cache_fname(fpath), "wb") as fp:
    135     pickle.dump((self.compatible_version, self._store), fp, pickle.HIGHEST_PROTOCOL)

PCSEError: No path or URL specified where to find YAML crop parameter files
akouete-kpakpo commented 2 years ago
cd nevergrad/functions/irrigation/data/
git clone https://github.com/ajwdewit/WOFOST_crop_parameters.git

solved