{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/torchrl-a-data-driven-decision-making-library","title":"TorchRL: A data-driven decision-making library for PyTorch","arxiv_id":"2306.00577","date":"2023-06-01","proceeding":null,"authors":["Albert Bou","Matteo Bettini","Sebastian Dittert","Vikash Kumar","Shagun Sodhani","Xiaomeng Yang","Gianni de Fabritiis","Vincent Moens"],"abstract":"PyTorch has ascended as a premier machine learning framework, yet it lacks a native and comprehensive library for decision and control tasks suitable for large development teams dealing with complex real-world data and environments. To address this issue, we propose TorchRL, a generalistic control library for PyTorch that provides well-integrated, yet standalone components. We introduce a new and flexible PyTorch primitive, the TensorDict, which facilitates streamlined algorithm development across the many branches of Reinforcement Learning (RL) and control. We provide a detailed description of the building blocks and an extensive overview of the library across domains and tasks. Finally, we experimentally demonstrate its reliability and flexibility and show comparative benchmarks to demonstrate its computational efficiency. TorchRL fosters long-term support and is publicly available on GitHub for greater reproducibility and collaboration within the research community. The code is open-sourced on GitHub.","url_abs":"https://arxiv.org/abs/2306.00577v2","url_pdf":"https://arxiv.org/pdf/2306.00577v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"torchrl-a-data-driven-decision-making-library","repo_url":"https://github.com/pytorch/rl","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"torchrl-a-data-driven-decision-making-library","repo_url":"https://github.com/pytorch/tensordict","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"}],"methods":[{"method_slug":null,"method_name":"Library"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2306.00577","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.00577"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pytorch/tensordict","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pytorch/rl","reach":null}],"summary":{"unverified":9},"by_repo_kind":{"listed":{"samples":9,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":9,"samples":[{"code_sha256_prefix":"e6ef6405604144d2","entry":"context_decorator","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_contextlib.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_contextlib.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"e6ef6405604144d2"}},{"code_sha256_prefix":"6cc4a203b7755ebf","entry":"from_module","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_td_functions.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_td_functions.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"6cc4a203b7755ebf"}},{"code_sha256_prefix":"3a126ef62bc7e16e","entry":"from_pytree","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_td_functions.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_td_functions.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"3a126ef62bc7e16e"}},{"code_sha256_prefix":"2d21bf5ac93ba3d8","entry":"implements_for_lazy_td","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_torch_func.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_torch_func.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"2d21bf5ac93ba3d8"}},{"code_sha256_prefix":"69cb00f80911c33c","entry":"implements_for_td","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_torch_func.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_torch_func.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"69cb00f80911c33c"}},{"code_sha256_prefix":"e110871d506bc247","entry":"is_memmap_archive","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_archive.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_archive.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"e110871d506bc247"}},{"code_sha256_prefix":"f1b4fae143503130","entry":"pack_memmap","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_archive.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_archive.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"f1b4fae143503130"}},{"code_sha256_prefix":"7e4980e2b53b82c2","entry":"stack","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_td_functions.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_td_functions.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"7e4980e2b53b82c2"}},{"code_sha256_prefix":"e69817b4b08fd775","entry":"unpack_memmap","repo":"pytorch/tensordict","repo_kind":"listed","path":"tensordict/_archive.py","file_url":"https://github.com/pytorch/tensordict/blob/HEAD/tensordict/_archive.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"e69817b4b08fd775"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}