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

Incorporate PyTorch Channel #11

Merged
merged 10 commits into from
Apr 6, 2021
Merged

Conversation

mfansler
Copy link
Member

@mfansler mfansler commented Apr 5, 2021

Purpose

This aims to enable Windows builds. This is achieved by including the PyTorch channel. We are also prioritizing the PyTorch channel since it is an authoritative source of PyTorch builds and so we want to ensure runtime testing maintains compatibility with such builds.

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Related Issues

closes #10
closes #7
relates to #9

Directives

@conda-forge-admin please rerender

@mfansler mfansler requested a review from akshayka as a code owner April 5, 2021 04:35
@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 (recipe) and found it was in an excellent condition.

@mfansler
Copy link
Member Author

mfansler commented Apr 5, 2021

This didn't work. Seems like they changed the functionality, but never updated the docs. See conda-forge/conda-smithy#935

Looks like the updated solution is to use

conda_build_config.yaml

channels_sources:
  - pytorch,conda-forge,defaults

@mfansler
Copy link
Member Author

mfansler commented Apr 5, 2021

@conda-forge-admin please rerender

@mfansler
Copy link
Member Author

mfansler commented Apr 5, 2021

uh...possible repeated typos throughout that thread. Seems like it might need to be channel_sources not channels_sources. Still waiting on the rerender to know for sure.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2021

Hi! This is the friendly automated conda-forge-webservice.
I tried to rerender for you, but it looks like there was nothing to do.

@mfansler
Copy link
Member Author

mfansler commented Apr 5, 2021

@conda-forge-admin please rerender

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2021

Hi! This is the friendly automated conda-forge-webservice.
I tried to rerender for you, but it looks like there was nothing to do.

@mfansler
Copy link
Member Author

mfansler commented Apr 5, 2021

For OSX builds, failures involve dynamic library linking from torchvision

import: 'pymde'
Traceback (most recent call last):
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/test_tmp/run_test.py", line 2, in <module>
    import pymde
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/pymde/__init__.py", line 7, in <module>
    from pymde import datasets
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/pymde/datasets.py", line 22, in <module>
    import torchvision
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/__init__.py", line 1, in <module>
    from torchvision import models
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/models/__init__.py", line 11, in <module>
    from . import detection
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/models/detection/__init__.py", line 1, in <module>
    from .faster_rcnn import *
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/models/detection/faster_rcnn.py", line 7, in <module>
    from torchvision.ops import misc as misc_nn_ops
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/ops/__init__.py", line 1, in <module>
    from .boxes import nms, box_iou
  File "/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/ops/boxes.py", line 2, in <module>
    from torchvision import _C
ImportError: dlopen(/Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/_C.cpython-36m-darwin.so, 2): Symbol not found: __ZN6caffe26detail36_typeMetaDataInstance_preallocated_0E
  Referenced from: /Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/_C.cpython-36m-darwin.so
  Expected in: flat namespace
 in /Users/runner/miniforge3/conda-bld/pymde_1617603439423/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/site-packages/torchvision/_C.cpython-36m-darwin.so
Tests failed for pymde-0.1.7-py36hab44bd3_1.tar.bz2 - moving package to /Users/runner/miniforge3/conda-bld/broken

Possible this is due to it using old version of torchvision (0.3.0) getting picked by the solver. It is unclear why this is. I would guess that the failure itself might be due to having been built against older versions of OSX images - not sure.

Maybe this could be fixed by requiring a minimum version of torchvision package.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2021

Hi! This is the friendly automated conda-forge-webservice.
I tried to rerender for you, but it looks like there was nothing to do.

@mfansler
Copy link
Member Author

mfansler commented Apr 5, 2021

Conda solver is struggling - not clear why. Setting to Draft until have time to investigate.

@mfansler mfansler marked this pull request as draft April 5, 2021 07:55
@mfansler
Copy link
Member Author

mfansler commented Apr 6, 2021

@conda-forge-admin please rerender

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2021

Hi! This is the friendly automated conda-forge-webservice.
I tried to rerender for you, but it looks like there was nothing to do.

@mfansler mfansler marked this pull request as ready for review April 6, 2021 05:00
@mfansler mfansler closed this Apr 6, 2021
@mfansler mfansler reopened this Apr 6, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2021

Hi! This is the friendly automated conda-forge-webservice.
I tried to rerender for you, but it looks like there was nothing to do.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2021

Hi! This is the friendly automated conda-forge-webservice.
I tried to rerender for you, but it looks like there was nothing to do.

@mfansler
Copy link
Member Author

mfansler commented Apr 6, 2021

@akshayka looks like switching to a flexible solve fixed the issue. Have a look and see if all the changes make sense. The torchvision>=0.8.2 version constraint likely isn't entirely necessary, but that's the minimum that works with pytorch>=1.7.1, so it should improve the solving performance in the testing.

@marcelotrevisani
Copy link
Member

@conda-forge-admin please rerender

@akshayka akshayka mentioned this pull request Apr 6, 2021
@akshayka
Copy link
Contributor

akshayka commented Apr 6, 2021

@akshayka looks like switching to a flexible solve fixed the issue. Have a look and see if all the changes make sense. The torchvision>=0.8.2 version constraint likely isn't entirely necessary, but that's the minimum that works with pytorch>=1.7.1, so it should improve the solving performance in the testing.

Awesome! The changes look good to me.

@marcelotrevisani marcelotrevisani added the automerge Merge the PR when CI passes label Apr 6, 2021
@marcelotrevisani
Copy link
Member

As @akshayka agreed with the modifications I added the label to the bot to automerge it if everything passes :)

@github-actions github-actions bot merged commit 52bf9fe into conda-forge:master Apr 6, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2021

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

  • linter: passed
  • azure: passed

Thus the PR was passing and merged! Have a great day!

@mfansler
Copy link
Member Author

mfansler commented Apr 7, 2021

Builds aren't being uploaded. Found this in the Azure logs:

pytorch channel not allowed

Essentially the premise of this PR appears to violate a Conda Forge channel policy.

@marcelotrevisani do you have any insight into this? For now it seems like I should revert this merge out of master.

@marcelotrevisani
Copy link
Member

Builds aren't being uploaded. Found this in the Azure logs:

pytorch channel not allowed

Essentially the premise of this PR appears to violate a Conda Forge channel policy.

@marcelotrevisani do you have any insight into this? For now it seems like I should revert this merge out of master.

Sorry for my lack of attention on this PR, but indeed it is not allowed to add new channels. Could you please remove that in another PR?

@mfansler mfansler mentioned this pull request Apr 7, 2021
4 tasks
@mfansler mfansler deleted the pytorch-win branch April 7, 2021 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the PR when CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Windows PyTorch Minimum Version
4 participants