{"id":4721,"date":"2021-06-09T14:02:02","date_gmt":"2021-06-09T14:02:02","guid":{"rendered":"https:\/\/www.dinu.at\/profile\/home\/?p=4721"},"modified":"2021-06-09T14:08:35","modified_gmt":"2021-06-09T14:08:35","slug":"lighter-dependency-injection-with-pytorch","status":"publish","type":"post","link":"https:\/\/www.dinu.at\/profile\/home\/lighter-dependency-injection-with-pytorch\/","title":{"rendered":"Lighter: Dependency Injection for PyTorch"},"content":{"rendered":"<div id=\"themify_builder_content-4721\" data-postid=\"4721\" class=\"themify_builder_content themify_builder_content-4721 themify_builder\">\n\n    \n\t\t<!-- module_row -->\n\t\t<div  class=\"themify_builder_row module_row clearfix module_row_0 themify_builder_4721_row module_row_4721-0\" data-id=\"d7ac6b5\">\n\t\t\t\t\t\t<div class=\"row_inner col_align_top\" >\n                                    <div  class=\"module_column tb-column col-full first tb_4721_column module_column_0 module_column_4721-0-0\" data-id=\"272a726\" >\n                                                                <div class=\"tb-column-inner\">\n                            \n\n    <!-- module plain text -->\n    <div  id=\"plain-text-4721-0-0-0\" class=\"module module-plain-text plain-text-4721-0-0-0  \" data-id=\"ac165bc\">\n        <!--insert-->\n        Python & Machine Learning: If you ever thought that handling all those kwargs, dictionaries of config properties, or huge method parameter listings feels tedious and somewhat like a step back in the evolution of programming language, well... then this is because you are completely right! It is a step back. Prominent languages such as Java and C# have matured in the practices of decoupling components of interest through the application of Aspect-oriented programming schemes. With the Python programming language this trend somewhat got overlooked, since it seems to contradict with the pythonic way of coding. One of the most crucial components to offer well-structured project management, especially when transitioning from prototyping to large scale project structures, has gotten forgotten - namely dependency injection. With dependency injection one can ignore specifying the concrete object when connecting components in a larger scale project, but rather focus on specific parts and merging those parts with flexible and lightweight configs. Lighter offers a glimpse in this direction and shows how one can easily patch together a protype project in a well separated and manageable way. For more details and examples follow <a href=\"https:\/\/github.com\/Xpitfire\/lighter\">this<\/a> link.     <\/div>\n    <!-- \/module plain text -->\n\n                        <\/div>\n                    \t\t<\/div>\n\t\t                                <\/div>\n                                <!-- \/row_inner -->\n                        <\/div>\n                        <!-- \/module_row -->\n\t\t\n\t\t<!-- module_row -->\n\t\t<div  class=\"themify_builder_row module_row clearfix module_row_1 themify_builder_4721_row module_row_4721-1\" data-id=\"e5f9e90\">\n\t\t\t\t\t\t<div class=\"row_inner col_align_top\" >\n                                    <div  class=\"module_column tb-column col-full first tb_4721_column module_column_0 module_column_4721-1-0\" data-id=\"5a59d47\" >\n                                                                <div class=\"tb-column-inner\">\n                            \n\n    <!-- module image -->\n    <div  id=\"image-4721-1-0-0\" class=\"module module-image image-4721-1-0-0  image-top  \" data-id=\"dc9fabf\">\n        <!--insert-->\n        \n        <div class=\"image-wrap\">\n                            <img loading=\"lazy\" width=\"943\" height=\"775\" src=\"https:\/\/i1.wp.com\/www.dinu.at\/wp-content\/uploads\/2021\/06\/lighter.png?resize=943%2C775&#038;ssl=1\" class=\" wp-post-image wp-image-4724\" alt=\"lighter\" srcset=\"https:\/\/i1.wp.com\/www.dinu.at\/wp-content\/uploads\/2021\/06\/lighter.png?w=943&amp;ssl=1 943w, https:\/\/i1.wp.com\/www.dinu.at\/wp-content\/uploads\/2021\/06\/lighter.png?resize=300%2C247&amp;ssl=1 300w, https:\/\/i1.wp.com\/www.dinu.at\/wp-content\/uploads\/2021\/06\/lighter.png?resize=768%2C631&amp;ssl=1 768w\" sizes=\"(max-width: 943px) 100vw, 943px\" data-recalc-dims=\"1\" \/>            \n                        <\/div>\n            <!-- \/image-wrap -->\n        \n        \n            <\/div>\n    <!-- \/module image -->\n\n                        <\/div>\n                    \t\t<\/div>\n\t\t                                <\/div>\n                                <!-- \/row_inner -->\n                        <\/div>\n                        <!-- \/module_row -->\n\t\t<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python &#038; Machine Learning: If you ever thought that handling all those kwargs, dictionaries of config properties, or huge method parameter listings feels tedious and somewhat like a step back in the evolution of programming language, well&#8230; then this is because you are completely right! It is a step back. Prominent languages such as Java [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7SrVj-1e9","jetpack-related-posts":[{"id":5142,"url":"https:\/\/www.dinu.at\/profile\/home\/a-neuro-symbolic-perspective-on-large-language-models-llms\/","url_meta":{"origin":4721,"position":0},"title":"A Neuro-Symbolic Perspective on Large Language Models (LLMs)","date":"22. January 2023","format":false,"excerpt":"We are excited to present our work, combining the power of a symbolic approach and Large Language Models (LLMs). Our Symbolic API bridges the gap between classical programming (Software 1.0) and differentiable programming (Software 2.0). Conceptually, our framework uses neural networks - specifically LLMs - at its core, and composes\u2026","rel":"","context":"In &quot;General&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.dinu.at\/wp-content\/uploads\/2023\/01\/symai_logo.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4493,"url":"https:\/\/www.dinu.at\/profile\/home\/bachelor-thesis\/","url_meta":{"origin":4721,"position":1},"title":"Bachelor Thesis","date":"21. July 2015","format":false,"excerpt":"Cross-Language integration for the Common Language Runtime of the .NET Framework Institute: University of Applied Sciences Upper-Austria Field of Study: Software Engineering Author: Dinu Marius-ConstantinPrelude The basic idea is to translate any programming language\u00a0code into .NET Intermediate Language (IL) code by using the open source .NET Compiler Platform (Roslyn). Roslyn\u2026","rel":"","context":"In &quot;Education&quot;","img":{"alt_text":"","src":"https:\/\/i1.wp.com\/www.dinu.at\/wp-content\/uploads\/2015\/07\/keep-calm-and-write-bachelor-thesis-1.png?fit=600%2C700&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4580,"url":"https:\/\/www.dinu.at\/profile\/home\/swift-project\/","url_meta":{"origin":4721,"position":2},"title":"Uni Swift Project","date":"15. May 2017","format":false,"excerpt":"This project is a mobile application for managing your images. HOWEVER, where most applications start to struggle when it comes to searching the right images for the right moments, here you simply find them. \u00a0","rel":"","context":"In &quot;General&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4644,"url":"https:\/\/www.dinu.at\/profile\/home\/imagine-kara\/","url_meta":{"origin":4721,"position":3},"title":"Imagine Kara","date":"9. May 2018","format":false,"excerpt":"Imagine Kara was one of the most exciting project I have been able to work on and the team has worked exceptionally hard and dedicated to make it reality! Sadly, as life goes one, some project come and some may go to enable other ideas to flourish.\u00a0 I want to\u2026","rel":"","context":"In &quot;General&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4636,"url":"https:\/\/www.dinu.at\/profile\/home\/seamlessly-entering-the-crypto-world-with-apollon\/","url_meta":{"origin":4721,"position":4},"title":"Seamlessly entering the crypto world with Apollon","date":"25. April 2018","format":false,"excerpt":"This will provide you an overview regarding the Apollon project and how you can get started with masternodes.","rel":"","context":"In &quot;General&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4567,"url":"https:\/\/www.dinu.at\/profile\/home\/deep-learning-script\/","url_meta":{"origin":4721,"position":5},"title":"Deep Learning Script","date":"19. April 2017","format":false,"excerpt":"NVIDIA DIGITS offers great support for\u00a0experimenting with Deep Learning and provides\u00a0great integration of Caffe Script. To improve this experience I developed a DSL for Caffe which eases the prototyping of network architectures by drastically reducing the amount of code line and simplifying the development. All the results are available on\u2026","rel":"","context":"In &quot;General&quot;","img":{"alt_text":"","src":"https:\/\/i2.wp.com\/www.dinu.at\/wp-content\/uploads\/2017\/04\/DLS-1024x651.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"builder_content":"Python & Machine Learning: If you ever thought that handling all those kwargs, dictionaries of config properties, or huge method parameter listings feels tedious and somewhat like a step back in the evolution of programming language, well... then this is because you are completely right! It is a step back. Prominent languages such as Java and C# have matured in the practices of decoupling components of interest through the application of Aspect-oriented programming schemes. With the Python programming language this trend somewhat got overlooked, since it seems to contradict with the pythonic way of coding. One of the most crucial components to offer well-structured project management, especially when transitioning from prototyping to large scale project structures, has gotten forgotten - namely dependency injection. With dependency injection one can ignore specifying the concrete object when connecting components in a larger scale project, but rather focus on specific parts and merging those parts with flexible and lightweight configs. Lighter offers a glimpse in this direction and shows how one can easily patch together a protype project in a well separated and manageable way. For more details and examples follow <a href=\"https:\/\/github.com\/Xpitfire\/lighter\">this<\/a> link. \n <img loading=\"lazy\" width=\"943\" height=\"775\" src=\"https:\/\/www.dinu.at\/wp-content\/uploads\/2021\/06\/lighter.png\" alt=\"lighter\" srcset=\"https:\/\/i1.wp.com\/www.dinu.at\/wp-content\/uploads\/2021\/06\/lighter.png?w=943&amp;ssl=1 943w, https:\/\/i1.wp.com\/www.dinu.at\/wp-content\/uploads\/2021\/06\/lighter.png?resize=300%2C247&amp;ssl=1 300w, https:\/\/i1.wp.com\/www.dinu.at\/wp-content\/uploads\/2021\/06\/lighter.png?resize=768%2C631&amp;ssl=1 768w\" sizes=\"(max-width: 943px) 100vw, 943px\" \/>","_links":{"self":[{"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/posts\/4721"}],"collection":[{"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/comments?post=4721"}],"version-history":[{"count":22,"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/posts\/4721\/revisions"}],"predecessor-version":[{"id":4746,"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/posts\/4721\/revisions\/4746"}],"wp:attachment":[{"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/media?parent=4721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/categories?post=4721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dinu.at\/profile\/home\/wp-json\/wp\/v2\/tags?post=4721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}