{"id":27451,"library":"tf-models-nightly","title":"TensorFlow Official Models (nightly)","description":"Nightly builds of TensorFlow Official Models, a collection of state-of-the-art models implemented in TensorFlow. Current version 2.21.0.dev20260217, targeting TF 2.21 nightly. Released daily. Note that research/tutorial/sample models have been removed in recent versions.","status":"active","version":"2.21.0.dev20260217","language":"python","source_language":"en","source_url":"https://github.com/tensorflow/models","tags":["tensorflow","official-models","nightly","deep-learning"],"install":[{"cmd":"pip install tf-models-nightly","lang":"bash","label":"Install nightly"}],"dependencies":[{"reason":"TF Official Models require TensorFlow as runtime.","package":"tensorflow","optional":false},{"reason":"Required for NLP models; not installed automatically by tf-models-nightly (use tf-models-nightly-text for automatic install).","package":"tensorflow-text","optional":true}],"imports":[{"note":"The 'official.models' module was removed; official models are now under subpackages like official.vision, official.nlp, etc.","wrong":"from official.models import ...","symbol":"OfficialModel","correct":"from official import vision"}],"quickstart":{"code":"import tensorflow as tf\nfrom official import vision\n\n# Example: build a ResNet-50 model\ntry:\n    model = vision.modeling.ResNet50()\n    print(model.name)\nexcept Exception as e:\n    print(f\"Error: {e}\")\n","lang":"python","description":"Basic import and model instantiation."},"warnings":[{"fix":"Migrate to community-maintained forks or use legacy versions (v2.15.x or earlier).","message":"Research/tutorial/sample models have been removed from the repository starting from v2.16.0. Code relying on 'official.research' or 'official.tutorials' will break.","severity":"breaking","affected_versions":">=2.16.0"},{"fix":"Run 'pip install tf-models-nightly-text' or install 'tensorflow-text' manually matching your TensorFlow version.","message":"The package 'tf-models-nightly' does not install 'tensorflow-text' automatically, but several NLP models require it. If you get an ImportError for TensorFlow Text, install a compatible version separately.","severity":"gotcha","affected_versions":"all"},{"fix":"Update imports to use subpackages (e.g., official.vision, official.nlp).","message":"The old import 'from official.modeling import ...' is deprecated in favor of subpackage imports like 'from official.vision.modeling import ...'. Old imports may break in future releases.","severity":"deprecated","affected_versions":">=2.15.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'from official.vision.modeling import ResNet' instead.","cause":"The 'official.models' module was removed; models are now in subpackages like 'official.vision'.","error":"ImportError: cannot import name 'ResNet' from 'official.models'"},{"fix":"Install tensorflow-text: 'pip install tensorflow-text' (ensure version matches TensorFlow).","cause":"tf-models-nightly does not install tensorflow-text as a dependency; needed for NLP models.","error":"ModuleNotFoundError: No module named 'tensorflow_text'"},{"fix":"Use a version before v2.16.0 or find alternative implementations.","cause":"Research models were removed in v2.16.0+.","error":"AttributeError: module 'official' has no attribute 'research'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}