tensorflow / tensorflow/privacy

Fresh install doesn't work (incompatible versions of tensorflow and tensorflow_privacy)

Open
#520 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
477
Avg merge
22h 12m
Merged PRs (30d)
1

Description

Problem: Fresh install of tensorflow_privacy doesn't work

Steps to recreate: Create a new environment, run
pip install tensorflow-privacy
Now from within python, run
import tensorflow_privacy

I get this horrendous-looking error
ValueError: Arg specs do not match: original=FullArgSpec(args=['input', 'dtype', 'name', 'layout'], varargs=None, varkw=None, defaults=(None, None, None), kwonlyargs=[], kwonlydefaults=None, annotations={}), new=FullArgSpec(args=['input', 'dtype', 'name'], varargs=None, varkw=None, defaults=(None, None), kwonlyargs=[], kwonlydefaults=None, annotations={}), fn=<function ones_like_v2 at 0x16fe7a200>

Quick fix:
pip install tfp-nightly

Root of the problem:
This issue in tfp shows that the problem is that the current version of tfp was built using tf 2.13, however the latest version of tf is now 2.14 and they are incompatible. This is fixed in the nightly version of tfp but not yet in the main release.

SO, the error is not your fault (the privacy team) but in terms of the user experience I installed privacy and it didn't work. Is this something you could fix by specifying version numbers? I think if you do nothing the problem will fix itself when a new version of tfp is released, but then it might reappear when a new version of tensorflow is released

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the fresh-environment installation with pip install tensorflow-privacy, then test import tensorflow_privacy and inspect the package dependency declarations. Done means a fresh install imports successfully with compatible TensorFlow and TensorFlow Probability versions, including coverage for future version mismatches.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.