Title: the problem to access nested Python attributes or methods **(py.. torch/backends mps is_available)**. · Issue #271 · clj-python/libpython-clj · GitHub
Open Graph Title: the problem to access nested Python attributes or methods **(py.. torch/backends mps is_available)**. · Issue #271 · clj-python/libpython-clj
X Title: the problem to access nested Python attributes or methods **(py.. torch/backends mps is_available)**. · Issue #271 · clj-python/libpython-clj
Description: the problem to access nested Python attributes or methods (py.. torch/backends mps is_available), Please comment how to fix it (defn get-device [] (try (let [device (torch/device (if (py.. torch/backends mps is_available) "mps" "cpu"))] ...
Open Graph Description: the problem to access nested Python attributes or methods (py.. torch/backends mps is_available), Please comment how to fix it (defn get-device [] (try (let [device (torch/device (if (py.. torch/ba...
X Description: the problem to access nested Python attributes or methods (py.. torch/backends mps is_available), Please comment how to fix it (defn get-device [] (try (let [device (torch/device (if (py.. torch/ba...
Opengraph URL: https://github.com/clj-python/libpython-clj/issues/271
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"the problem to access nested Python attributes or methods **(py.. torch/backends mps is_available)**.","articleBody":"the problem to access nested Python attributes or methods \n**(py.. torch/backends mps is_available)**, \nPlease comment how to fix it\n\n```\n(defn get-device []\n (try\n (let [device (torch/device (if (py.. torch/backends mps is_available)\n \"mps\"\n \"cpu\"))]\n (println \"Using device:\" device)\n device)\n (catch Exception e\n (println \"Error initializing device:\" (.getMessage e))\n (torch/device \"cpu\")))) ;; Fallback to CPU on error\n\n```","author":{"url":"https://github.com/Thinking-Functionally","@type":"Person","name":"Thinking-Functionally"},"datePublished":"2025-06-22T13:49:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/271/libpython-clj/issues/271"}
| 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:96b247b8-ab05-92aa-ee91-2ca6fe98cc6c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B51A:2F7415:7D68DB:AD6407:6A604007 |
| html-safe-nonce | 249ee1a8bafa6503e5be9cbdf313b5644604f5330f72112b45776b5b2a30fb58 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTFBOjJGNzQxNTo3RDY4REI6QUQ2NDA3OjZBNjA0MDA3IiwidmlzaXRvcl9pZCI6Ijg1OTY1MDYyNzE3MDQ2OTQ3OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cd4c9c88c374c027aad4d6bc9012aff85c32cb3e81c7aa4e6d65267f50928000 |
| hovercard-subject-tag | issue:3165978040 |
| 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/clj-python/libpython-clj/271/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5dad1cd3189c421f16689d37569b5a6d59e5ea846dc0421bc86cf2ab225e57d6/clj-python/libpython-clj/issues/271 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5dad1cd3189c421f16689d37569b5a6d59e5ea846dc0421bc86cf2ab225e57d6/clj-python/libpython-clj/issues/271 |
| og:image:alt | the problem to access nested Python attributes or methods (py.. torch/backends mps is_available), Please comment how to fix it (defn get-device [] (try (let [device (torch/device (if (py.. torch/ba... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Thinking-Functionally |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60da8c2a42fa2bbf5f7567474990ec467836a84444262a58e200fa91b7f3d2d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/clj-python/libpython-clj git https://github.com/clj-python/libpython-clj.git |
| octolytics-dimension-user_id | 60827878 |
| octolytics-dimension-user_login | clj-python |
| octolytics-dimension-repository_id | 187095617 |
| octolytics-dimension-repository_nwo | clj-python/libpython-clj |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 187095617 |
| octolytics-dimension-repository_network_root_nwo | clj-python/libpython-clj |
| 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 | 9824515e740d83d5eb82168a089b806ab0fe04a1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width