Title: Evaluating operations outside the `with` block in Jupyter Notebook grows the `graph.operations` dict · Issue #55 · spotify/pythonflow · GitHub
Open Graph Title: Evaluating operations outside the `with` block in Jupyter Notebook grows the `graph.operations` dict · Issue #55 · spotify/pythonflow
X Title: Evaluating operations outside the `with` block in Jupyter Notebook grows the `graph.operations` dict · Issue #55 · spotify/pythonflow
Description: This seem like a bug, and probably related to fact that I am running this in a jupyter notebook. Given this example: import pythonflow as pf with pf.Graph() as graph: a = pf.constant(4, name='a') b = pf.constant(38, name='b') x = (a + b)...
Open Graph Description: This seem like a bug, and probably related to fact that I am running this in a jupyter notebook. Given this example: import pythonflow as pf with pf.Graph() as graph: a = pf.constant(4, name='a') b...
X Description: This seem like a bug, and probably related to fact that I am running this in a jupyter notebook. Given this example: import pythonflow as pf with pf.Graph() as graph: a = pf.constant(4, name='a...
Opengraph URL: https://github.com/spotify/pythonflow/issues/55
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Evaluating operations outside the `with` block in Jupyter Notebook grows the `graph.operations` dict","articleBody":"This seem like a bug, and probably related to fact that I am running this in a `jupyter` notebook. Given this example:\r\n\r\n```python\r\nimport pythonflow as pf\r\n\r\nwith pf.Graph() as graph:\r\n a = pf.constant(4, name='a')\r\n b = pf.constant(38, name='b')\r\n x = (a + b).set_name('x')\r\n```\r\n\r\nlooking at the `graph.operations` looks fine initially:\r\n\r\n```\r\n{'a': \u003cpf.func_op 'a' target=\u003cfunction identity at 0x106500310\u003e args=\u003c1 items\u003e kwargs=\u003c0 items\u003e\u003e,\r\n 'b': \u003cpf.func_op 'b' target=\u003cfunction identity at 0x106500310\u003e args=\u003c1 items\u003e kwargs=\u003c0 items\u003e\u003e,\r\n 'x': \u003cpf.func_op 'x' target=\u003cbuilt-in function add\u003e args=\u003c2 items\u003e kwargs=\u003c0 items\u003e\u003e}\r\n```\r\n\r\nHowever, if I evaluate any of the `Operation` instances in the notebook cell (e.g. `a` or `b` at the end of the cell) the dictionary with `graph.operations` grows with additional items (and continues growing by a dozen new `getattr` operations every time I evaluate any of the operations)\r\n\r\nHere a screenshot that is self-explaining:\r\n\r\n\r\n\r\nIs there a way to prevent this behavior?","author":{"url":"https://github.com/MatusGasparik","@type":"Person","name":"MatusGasparik"},"datePublished":"2023-05-09T13:06:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/55/pythonflow/issues/55"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5eaf2db1-aab4-f33e-0b76-92cea4dbe02a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CDB2:5EA33:A874C2:E6D4DC:6A4DE102 |
| html-safe-nonce | e7e3a8015b0c8c74dd67cc10bb2b58f50d82046de3b30a6b8f73d2d0d03e5cba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREIyOjVFQTMzOkE4NzRDMjpFNkQ0REM6NkE0REUxMDIiLCJ2aXNpdG9yX2lkIjoiMzk3NTg4MDQ5MjQ2OTM3MzQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 900ca1efe2706b9a58f74a292de270db8c478e698bcb086ef1756c463ee2271c |
| hovercard-subject-tag | issue:1701999490 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/spotify/pythonflow/55/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54a9af7cb0d967b0489da70355df39818ca61ec812f7e8daaa89e127105046bc/spotify/pythonflow/issues/55 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54a9af7cb0d967b0489da70355df39818ca61ec812f7e8daaa89e127105046bc/spotify/pythonflow/issues/55 |
| og:image:alt | This seem like a bug, and probably related to fact that I am running this in a jupyter notebook. Given this example: import pythonflow as pf with pf.Graph() as graph: a = pf.constant(4, name='a') b... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MatusGasparik |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/spotify/pythonflow git https://github.com/spotify/pythonflow.git |
| octolytics-dimension-user_id | 251374 |
| octolytics-dimension-user_login | spotify |
| octolytics-dimension-repository_id | 102513092 |
| octolytics-dimension-repository_nwo | spotify/pythonflow |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 102513092 |
| octolytics-dimension-repository_network_root_nwo | spotify/pythonflow |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width