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

Add zen3geo #20198

Merged
merged 6 commits into from
Sep 8, 2022
Merged

Add zen3geo #20198

merged 6 commits into from
Sep 8, 2022

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Aug 26, 2022

Geospatial machine learning pipelines with torch DataPipes! Source at https://github.com/weiji14/zen3geo

Only specifying the minimum dependencies (rioxarray and torchdata) to keep things simple, leaving other optional extras dependencies (see https://zen3geo.readthedocs.io/en/v0.3.0/#installation) to be installed by the user if needed.

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

Geospatial machine learning pipelines with torch DataPipes! Source at https://github.com/weiji14/zen3geo
@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/zen3geo) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipes/zen3geo:

  • License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/zen3geo) and found it was in an excellent condition.

Try to resolve `ModuleNotFoundError: No module named 'poetry'`.
@weiji14 weiji14 marked this pull request as draft August 26, 2022 03:18
recipes/zen3geo/meta.yaml Outdated Show resolved Hide resolved
@weiji14
Copy link
Member Author

weiji14 commented Aug 31, 2022

Sigh, should have used build-backend = "poetry.core.masonry.api" instead of build-backend = "poetry.masonry.api" in https://github.com/weiji14/zen3geo/blob/600975a994c892705bbd849c233533bad0b73fb6/pyproject.toml#L65-L67. Traceback from https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=560970&view=logs&j=6f142865-96c3-535c-b7ea-873d86b887bd&t=22b0682d-ab9e-55d7-9c79-49f3c3ba4823&l=2374 :

Traceback (most recent call last):
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 438, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 524, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 68, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 61, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 533, in prepare_metadata
    self.metadata_directory = generate_metadata(
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/operations/build/metadata.py", line 35, in generate_metadata
    distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_internal/utils/misc.py", line 706, in prepare_metadata_for_build_wheel
    return super().prepare_metadata_for_build_wheel(
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 188, in prepare_metadata_for_build_wheel
    return self._call_hook('prepare_metadata_for_build_wheel', {
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 332, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 89, in _build_backend
    obj = import_module(mod_path)
  File "/home/conda/staged-recipes/build_artifacts/zen3geo_1661949977139/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'poetry.masonry'

Will either need to:

  1. Patch the pyproject.toml file to use poetry.core.masonry.api
  2. Use the dev version of poetry v1.2.0rc2 somehow from [DEV] update to v1.2.0rc2 poetry-feedstock#71
  3. Wait for poetry v1.2.0 poetry-feedstock#72

Edit: going for option 2, see commits f436e9b and 8e33dc8, xref #19036?

@weiji14
Copy link
Member Author

weiji14 commented Aug 31, 2022

Windows builds failing is ok, because pytorch >=1.12.0 isn't available for Windows on conda-forge yet, xref conda-forge/pytorch-cpu-feedstock#32. Users can still install pytorch on Windows from the pytorch channel at https://anaconda.org/pytorch/pytorch/files?version=1.12.1 to make things work since the zen3geo build here is noarch.

Traceback (most recent call last):
  File "C:\Miniforge\lib\site-packages\boa\cli\mambabuild.py", line 124, in mamba_get_install_actions
    solution = solver.solve_for_action(_specs, prefix)
  File "C:\Miniforge\lib\site-packages\boa\core\solver.py", line 226, in solve_for_action
    t = self.solve(specs)
  File "C:\Miniforge\lib\site-packages\boa\core\solver.py", line 216, in solve
    raise RuntimeError("Solver could not find solution." + error_string)
RuntimeError: Solver could not find solution.Mamba failed to solve:
 - pip
 - rioxarray >=0.10.0
 - python >=3.8,<3.12
 - torchdata >=0.4.0

with channels:
 - local
 - conda-forge/label/poetry_dev
 - conda-forge/label/cleo_dev
 - conda-forge
 - conda-forge

The reported errors are:
- Encountered problems while solving:
-   - nothing provides pytorch >=1.12.0 needed by torchdata-0.4.0-pyh8b8bddf_0
- 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\1\s\.ci_support\build_all.py", line 223, in <module>
    build_all(os.path.join(root_dir, "recipes"), args.arch)
  File "D:\a\1\s\.ci_support\build_all.py", line 120, in build_all
  File "C:\Miniforge\lib\site-packages\boa\cli\mambabuild.py", line 133, in mamba_get_install_actions
    raise err
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform win-64: {MatchSpec("torchdata==0.4.0=pyh8b8bddf_0")}

@weiji14 weiji14 marked this pull request as ready for review August 31, 2022 13:44
@weiji14
Copy link
Member Author

weiji14 commented Aug 31, 2022

@conda-forge/help-python, ready for review!

weiji14 added a commit to weiji14/zen3geo that referenced this pull request Sep 1, 2022
Let build-backend depend only on poetry-core instead of full poetry. Partial revert of c2a190f in #3. Motivated by conda-forge/staged-recipes#20198 (comment).
weiji14 added a commit to weiji14/zen3geo that referenced this pull request Sep 1, 2022
* ⬆️ Bump poetry from 1.2.0rc1 to 1.2.0

Bumps [poetry](https://github.com/python-poetry/poetry) from 1.2.0rc1 to 1.2.0.
- [Release notes](https://github.com/python-poetry/poetry/releases)
- [Changelog](https://github.com/python-poetry/poetry/blob/master/CHANGELOG.md)
- [Commits](python-poetry/poetry@1.2.0rc1...1.2.0)

* 🎨 Use the pretty name of dependencies in poetry.lock file

Make the lockfile consistent with poetry 1.2.0, see python-poetry/poetry#6243.

* 👽 Use poetry-core instead of poetry in build system

Let build-backend depend only on poetry-core instead of full poetry. Partial revert of c2a190f in #3. Motivated by conda-forge/staged-recipes#20198 (comment).
@weiji14 weiji14 mentioned this pull request Sep 7, 2022
12 tasks
@weiji14
Copy link
Member Author

weiji14 commented Sep 7, 2022

Gentle ping for a review @conda-forge/help-python. Windows build failure is ok, as described in #20198 (comment).

@msarahan msarahan merged commit 83a93f3 into conda-forge:main Sep 8, 2022

about:
home: None
summary: The 🌏 data science library you've been waiting for~
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the ~ at the end expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants