René's URL Explorer Experiment


Title: Type Error on import of Tensorflow Code Block 3.7 Chapter 03 · Issue #212 · BayesianModelingandComputationInPython/BookCode_Edition1 · GitHub

Open Graph Title: Type Error on import of Tensorflow Code Block 3.7 Chapter 03 · Issue #212 · BayesianModelingandComputationInPython/BookCode_Edition1

X Title: Type Error on import of Tensorflow Code Block 3.7 Chapter 03 · Issue #212 · BayesianModelingandComputationInPython/BookCode_Edition1

Description: Chapter 03 Notebook Code 3.7 first cell cause type error on import of Tensorflow as tf import tensorflow as tf import tensorflow_probability as tfp tfd = tfp.distributions root = tfd.JointDistributionCoroutine.Root species_idx = tf.const...

Open Graph Description: Chapter 03 Notebook Code 3.7 first cell cause type error on import of Tensorflow as tf import tensorflow as tf import tensorflow_probability as tfp tfd = tfp.distributions root = tfd.JointDistribut...

X Description: Chapter 03 Notebook Code 3.7 first cell cause type error on import of Tensorflow as tf import tensorflow as tf import tensorflow_probability as tfp tfd = tfp.distributions root = tfd.JointDistribut...

Opengraph URL: https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type Error on import of Tensorflow Code Block 3.7 Chapter 03","articleBody":"Chapter 03 Notebook Code 3.7 first cell cause type error on import of Tensorflow as tf\r\n\r\n\r\nimport tensorflow as tf\r\nimport tensorflow_probability as tfp\r\n\r\ntfd = tfp.distributions\r\nroot = tfd.JointDistributionCoroutine.Root\r\n\r\nspecies_idx = tf.constant(all_species.codes, tf.int32)\r\nbody_mass_g = tf.constant(penguins[\"body_mass_g\"], tf.float32)\r\n\r\n@tfd.JointDistributionCoroutine\r\ndef jd_penguin_mass_all_species():\r\n    σ = yield root(tfd.Sample(\r\n            tfd.HalfStudentT(df=100, loc=0, scale=2000),\r\n            sample_shape=3,\r\n            name=\"sigma\"))\r\n    μ = yield root(tfd.Sample(\r\n            tfd.Normal(loc=4000, scale=3000),\r\n            sample_shape=3,\r\n            name=\"mu\"))\r\n    mass = yield tfd.Independent(\r\n        tfd.Normal(loc=tf.gather(μ, species_idx, axis=-1),\r\n                   scale=tf.gather(σ, species_idx, axis=-1)),\r\n        reinterpreted_batch_ndims=1,\r\n        name=\"mass\")\r\n\r\n\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n/tmp/ipykernel_21511/4136355668.py in \u003cmodule\u003e\r\n----\u003e 1 import tensorflow as tf\r\n      2 import tensorflow_probability as tfp\r\n      3 \r\n      4 tfd = tfp.distributions\r\n      5 root = tfd.JointDistributionCoroutine.Root\r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/tensorflow/__init__.py in \u003cmodule\u003e\r\n     39 import sys as _sys\r\n     40 \r\n---\u003e 41 from tensorflow.python.tools import module_util as _module_util\r\n     42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader\r\n     43 \r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/tensorflow/python/__init__.py in \u003cmodule\u003e\r\n     39 \r\n     40 from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow\r\n---\u003e 41 from tensorflow.python.eager import context\r\n     42 \r\n     43 # pylint: enable=wildcard-import\r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/tensorflow/python/eager/context.py in \u003cmodule\u003e\r\n     31 import six\r\n     32 \r\n---\u003e 33 from tensorflow.core.framework import function_pb2\r\n     34 from tensorflow.core.protobuf import config_pb2\r\n     35 from tensorflow.core.protobuf import rewriter_config_pb2\r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/tensorflow/core/framework/function_pb2.py in \u003cmodule\u003e\r\n     14 \r\n     15 \r\n---\u003e 16 from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2\r\n     17 from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2\r\n     18 from tensorflow.core.framework import op_def_pb2 as tensorflow_dot_core_dot_framework_dot_op__def__pb2\r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/tensorflow/core/framework/attr_value_pb2.py in \u003cmodule\u003e\r\n     14 \r\n     15 \r\n---\u003e 16 from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2\r\n     17 from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2\r\n     18 from tensorflow.core.framework import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2\r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/tensorflow/core/framework/tensor_pb2.py in \u003cmodule\u003e\r\n     14 \r\n     15 \r\n---\u003e 16 from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2\r\n     17 from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2\r\n     18 from tensorflow.core.framework import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2\r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/tensorflow/core/framework/resource_handle_pb2.py in \u003cmodule\u003e\r\n     14 \r\n     15 \r\n---\u003e 16 from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2\r\n     17 from tensorflow.core.framework import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2\r\n     18 \r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/tensorflow/core/framework/tensor_shape_pb2.py in \u003cmodule\u003e\r\n     34   containing_type=None,\r\n     35   fields=[\r\n---\u003e 36     _descriptor.FieldDescriptor(\r\n     37       name='size', full_name='tensorflow.TensorShapeProto.Dim.size', index=0,\r\n     38       number=1, type=3, cpp_type=2, label=1,\r\n\r\n~/mambaforge/envs/bmcp/lib/python3.9/site-packages/google/protobuf/descriptor.py in __new__(cls, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options, serialized_options, has_default_value, containing_oneof, json_name, file, create_key)\r\n    559                 has_default_value=True, containing_oneof=None, json_name=None,\r\n    560                 file=None, create_key=None):  # pylint: disable=redefined-builtin\r\n--\u003e 561       _message.Message._CheckCalledFromGeneratedFile()\r\n    562       if is_extension:\r\n    563         return _message.default_pool.FindExtensionByName(full_name)\r\n\r\nTypeError: Descriptors cannot not be created directly.\r\nIf this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc \u003e= 3.19.0.\r\nIf you cannot immediately regenerate your protos, some other possible workarounds are:\r\n 1. Downgrade the protobuf package to 3.20.x or lower.\r\n 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).\r\n\r\nMore information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates\r\n\r\nOs = Ubuntu22.04\r\npython as per environment.yml\r\n","author":{"url":"https://github.com/RogerS49","@type":"Person","name":"RogerS49"},"datePublished":"2023-08-21T13:54:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/212/BookCode_Edition1/issues/212"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6d7f205f-9b3c-af66-843f-2a0f6d492528
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8946:12866F:128612:1943F1:698EEDCE
html-safe-noncec9c8c55b65c33e7ad2b0a2a4943539297c40bf34e518f4b904b00ddc8ddc3745
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTQ2OjEyODY2RjoxMjg2MTI6MTk0M0YxOjY5OEVFRENFIiwidmlzaXRvcl9pZCI6IjIzNDY3NzU4MDE2NjIyMDUzOTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbc9d45e7fe4badad3bab8f1614a33416328b3242260ba4bed8a786b0e00248b9
hovercard-subject-tagissue:1859431947
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/BayesianModelingandComputationInPython/BookCode_Edition1/212/issue_layout
twitter:imagehttps://opengraph.githubassets.com/63cd7da40c04db703ca7a7a5511438567993c4b41714fa4a58dd9ceceacdf8b2/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/63cd7da40c04db703ca7a7a5511438567993c4b41714fa4a58dd9ceceacdf8b2/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212
og:image:altChapter 03 Notebook Code 3.7 first cell cause type error on import of Tensorflow as tf import tensorflow as tf import tensorflow_probability as tfp tfd = tfp.distributions root = tfd.JointDistribut...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameRogerS49
hostnamegithub.com
expected-hostnamegithub.com
Nonecb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba
turbo-cache-controlno-preview
go-importgithub.com/BayesianModelingandComputationInPython/BookCode_Edition1 git https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1.git
octolytics-dimension-user_id84690770
octolytics-dimension-user_loginBayesianModelingandComputationInPython
octolytics-dimension-repository_id397286760
octolytics-dimension-repository_nwoBayesianModelingandComputationInPython/BookCode_Edition1
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id397286760
octolytics-dimension-repository_network_root_nwoBayesianModelingandComputationInPython/BookCode_Edition1
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release74ed479fe042e0ee79d00083dd248df8cc447655
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FBayesianModelingandComputationInPython%2FBookCode_Edition1%2Fissues%2F212
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FBayesianModelingandComputationInPython%2FBookCode_Edition1%2Fissues%2F212
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=BayesianModelingandComputationInPython%2FBookCode_Edition1
Reloadhttps://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212
Reloadhttps://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212
Reloadhttps://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212
BayesianModelingandComputationInPython https://github.com/BayesianModelingandComputationInPython
BookCode_Edition1https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1
Please reload this pagehttps://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212
Notifications https://github.com/login?return_to=%2FBayesianModelingandComputationInPython%2FBookCode_Edition1
Fork 153 https://github.com/login?return_to=%2FBayesianModelingandComputationInPython%2FBookCode_Edition1
Star 562 https://github.com/login?return_to=%2FBayesianModelingandComputationInPython%2FBookCode_Edition1
Code https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1
Issues 43 https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues
Pull requests 2 https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/pulls
Actions https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/actions
Projects 0 https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/projects
Security 0 https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/security
Insights https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/pulse
Code https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1
Issues https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues
Pull requests https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/pulls
Actions https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/actions
Projects https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/projects
Security https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/security
Insights https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/pulse
New issuehttps://github.com/login?return_to=https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212
New issuehttps://github.com/login?return_to=https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212
Type Error on import of Tensorflow Code Block 3.7 Chapter 03https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212#top
https://github.com/RogerS49
https://github.com/RogerS49
RogerS49https://github.com/RogerS49
on Aug 21, 2023https://github.com/BayesianModelingandComputationInPython/BookCode_Edition1/issues/212#issue-1859431947
https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updateshttps://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.