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

torchvision: 0.2.1 -> 0.6.0 #82000

Closed
wants to merge 2 commits into from
Closed

torchvision: 0.2.1 -> 0.6.0 #82000

wants to merge 2 commits into from

Conversation

@eadwu
Copy link
Member

eadwu commented Mar 7, 2020

Darwin filenames are kinda not following a pattern.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@jonringer
Copy link
Contributor

jonringer commented Mar 14, 2020

looks like it's not compatible with master right now:

  ERROR: No matching distribution found for torch==1.4.0 (from torchvision==0.5.0)
cannot build derivation '/nix/store/6hjkr4xfr003j19kzwvirm81zg55h75r-python3.7-pywick-0.5.6.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/rcsqinlp8q4dh73kj92fa555mx361v08-env.drv': 4 dependencies couldn't be built
[5 built (2 failed), 19 copied (39.4 MiB), 12.1 MiB DL]
error: build of '/nix/store/rcsqinlp8q4dh73kj92fa555mx361v08-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/82000
4 package failed to build:
python37Packages.pywick python37Packages.torchvision python38Packages.pywick python38Packages.torchvision

pytorch is still on 1.2.0

@bhipple
Copy link
Contributor

bhipple commented May 9, 2020

I've fixed up and merged #75827, so this should now be actionable if you're interested in rebasing and giving it another try.

@eadwu eadwu changed the title torchvision: 0.2.1 -> 0.5.0 torchvision: 0.2.1 -> 0.6.0 May 9, 2020
@eadwu eadwu force-pushed the eadwu:torchvision/0.5.0 branch from d186452 to 7654cd8 May 9, 2020
@eadwu
Copy link
Member Author

eadwu commented May 9, 2020

Fixed hashes.

@bhipple
Copy link
Contributor

bhipple commented May 9, 2020

Result of nixpkgs-review pr 82000 1

5 packages marked as broken and skipped:
- linuxPackages_4_9.sysdig
- php73Extensions.zmq
- php74Extensions.pcs
- php74Extensions.zmq
- python37Packages.pyblock
4 packages failed to build:
- python37Packages.pywick
- python37Packages.torchvision
- python38Packages.pywick
- python38Packages.torchvision
@eadwu eadwu changed the title torchvision: 0.2.1 -> 0.6.0 torchvision: 0.2.1 -> 0.5.0 May 10, 2020
@eadwu eadwu changed the title torchvision: 0.2.1 -> 0.5.0 torchvision: 0.2.1 -> 0.6.0 May 10, 2020
@eadwu eadwu changed the title torchvision: 0.2.1 -> 0.6.0 torchvision: 0.2.1 -> 0.5.0 May 10, 2020
@eadwu
Copy link
Member Author

eadwu commented May 10, 2020

Dropped 0.6.0 bump, since it needs torch 1.5.x.

As for the failure, the wheel seems to have a pinned version of 1.4.0, which fails since ours is 1.4.1. As for changing the wheel contents, I'm not sure how to do that.

@eadwu eadwu force-pushed the eadwu:torchvision/0.5.0 branch from 7654cd8 to b784348 May 10, 2020
@bhipple
Copy link
Contributor

bhipple commented May 10, 2020

Ideally it would be nice to just build this from source, instead of using a wheel. Any reason we can't do that?

@eadwu
Copy link
Member Author

eadwu commented May 10, 2020

Not sure, just updated based on existing src.

Tried building the wheel from source instead directly using the wheel and I get error: [Errno 2] No such file or directory: 'which': 'which'.

@bhipple
Copy link
Contributor

bhipple commented May 10, 2020

For that particularly error, try adding which to buildInputs?

@eadwu
Copy link
Member Author

eadwu commented May 10, 2020

Looks like buildInputs isn't used but nativeBuildInputs is used.

Anyway I think I remembered a reason why it should be downloaded from pypi, probably specifically for prebuilt cuda support.

This should build fine now, though I can't guarantee complete feature parity.

@bhipple bhipple changed the title torchvision: 0.2.1 -> 0.5.0 torchvision: 0.2.1 -> 0.6.0 May 14, 2020
@bhipple
Copy link
Contributor

bhipple commented May 14, 2020

Result of nixpkgs-review pr 82000 1

2 packages failed to build:
- python37Packages.pywick
- python38Packages.pywick
2 packages built:
- python37Packages.torchvision
- python38Packages.torchvision
eadwu added 2 commits Mar 7, 2020
@eadwu eadwu force-pushed the eadwu:torchvision/0.5.0 branch from b9b59d5 to 74377ee May 15, 2020
@eadwu
Copy link
Member Author

eadwu commented May 15, 2020

Linked the original build error to pytorch/vision#1827.

Downgrading to 0.5.0 gave a stack trace I couldn't interpret much of, though from what I ripgreped, the calls seem to pass all the necessary parameters.

I'll leave this someone more well-versed with the packaging of torchvision.

Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 222, in <module>
    'clean': clean,
  File "/nix/store/8ha22qldm2wfhvsz4v9v2h3gmir71rg5-python3.7-setuptools-45.2.0/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/nix/store/8ha22qldm2wfhvsz4v9v2h3gmir71rg5-python3.7-setuptools-45.2.0/lib/python3.7/site-packages/setuptools/command/test.py", line 238, in run
    self.run_tests()
  File "/nix/store/8ha22qldm2wfhvsz4v9v2h3gmir71rg5-python3.7-setuptools-45.2.0/lib/python3.7/site-packages/setuptools/command/test.py", line 260, in run_tests
    exit=False,
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/main.py", line 100, in __init__
    self.parseArgs(argv)
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/main.py", line 124, in parseArgs
    self._do_discovery(argv[2:])
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/main.py", line 244, in _do_discovery
    self.createTests(from_discovery=True, Loader=Loader)
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/main.py", line 154, in createTests
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/loader.py", line 349, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/loader.py", line 406, in _find_tests
    full_path, pattern, namespace)
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/loader.py", line 483, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/nix/store/8ha22qldm2wfhvsz4v9v2h3gmir71rg5-python3.7-setuptools-45.2.0/lib/python3.7/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/loader.py", line 191, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/nix/store/8ha22qldm2wfhvsz4v9v2h3gmir71rg5-python3.7-setuptools-45.2.0/lib/python3.7/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/lib/python3.7/unittest/loader.py", line 205, in loadTestsFromName
    test = obj()
TypeError: ps_roi_align() missing 3 required positional arguments: 'input', 'boxes', and 'output_size'
@eadwu eadwu closed this May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.