home.social

#docstrings — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #docstrings, aggregated by home.social.

  1. Трудности перевода: почему LLM не умеют писать нормальные докстринги на русском и как это исправить

    Каждый, кто пробовал заставить кодинг-LLM написать вменяемый комментарий к коду на русском, знает, какая это боль. Часто модели либо срываются на английский, либо выдают «кальку», либо игнорируют структуру. А всё потому, что они изначально заточены на английский язык. Огрехи встречаются, в частности, в терминологии: модели путают технические заимствования, например «деплой», «коммит», с их буквальным переводом, что делает текст неестественным для разработчика. В структуре тоже не всегда всё гладко: при генерации на русском модели часто «ломают» установленный для Docstring формат (описание, параметры, return, exceptions), из-за чего IDE перестают подхватывать документацию. Существующие в природе датасеты для обучения кодинг-моделей вроде CodeSearchNet и The Vault либо не содержат русского языка, либо, как MCoNaLa, заточены на поиск, а не на генерацию документации. Именно эту проблему решают ученые из MWS AI: они самостоятельно собрали датасет StRuCom, как раз ориентированный на обучение ИИ генерировать комментарии к коду. Под катом — история о том, как он был собран.

    habr.com/ru/companies/mts_ai/a

    #датасет #комментарии_к_коду #docstrings #автоматизация_разработки #искусственный_интеллект #llm #обучение_моделей #научные_исследования #синтетические_данные #ai

  2. Трудности перевода: почему LLM не умеют писать нормальные докстринги на русском и как это исправить

    Каждый, кто пробовал заставить кодинг-LLM написать вменяемый комментарий к коду на русском, знает, какая это боль. Часто модели либо срываются на английский, либо выдают «кальку», либо игнорируют структуру. А всё потому, что они изначально заточены на английский язык. Огрехи встречаются, в частности, в терминологии: модели путают технические заимствования, например «деплой», «коммит», с их буквальным переводом, что делает текст неестественным для разработчика. В структуре тоже не всегда всё гладко: при генерации на русском модели часто «ломают» установленный для Docstring формат (описание, параметры, return, exceptions), из-за чего IDE перестают подхватывать документацию. Существующие в природе датасеты для обучения кодинг-моделей вроде CodeSearchNet и The Vault либо не содержат русского языка, либо, как MCoNaLa, заточены на поиск, а не на генерацию документации. Именно эту проблему решают ученые из MWS AI: они самостоятельно собрали датасет StRuCom, как раз ориентированный на обучение ИИ генерировать комментарии к коду. Под катом — история о том, как он был собран.

    habr.com/ru/companies/mts_ai/a

    #датасет #комментарии_к_коду #docstrings #автоматизация_разработки #искусственный_интеллект #llm #обучение_моделей #научные_исследования #синтетические_данные #ai

  3. Трудности перевода: почему LLM не умеют писать нормальные докстринги на русском и как это исправить

    Каждый, кто пробовал заставить кодинг-LLM написать вменяемый комментарий к коду на русском, знает, какая это боль. Часто модели либо срываются на английский, либо выдают «кальку», либо игнорируют структуру. А всё потому, что они изначально заточены на английский язык. Огрехи встречаются, в частности, в терминологии: модели путают технические заимствования, например «деплой», «коммит», с их буквальным переводом, что делает текст неестественным для разработчика. В структуре тоже не всегда всё гладко: при генерации на русском модели часто «ломают» установленный для Docstring формат (описание, параметры, return, exceptions), из-за чего IDE перестают подхватывать документацию. Существующие в природе датасеты для обучения кодинг-моделей вроде CodeSearchNet и The Vault либо не содержат русского языка, либо, как MCoNaLa, заточены на поиск, а не на генерацию документации. Именно эту проблему решают ученые из MWS AI: они самостоятельно собрали датасет StRuCom, как раз ориентированный на обучение ИИ генерировать комментарии к коду. Под катом — история о том, как он был собран.

    habr.com/ru/companies/mts_ai/a

    #датасет #комментарии_к_коду #docstrings #автоматизация_разработки #искусственный_интеллект #llm #обучение_моделей #научные_исследования #синтетические_данные #ai

  4. Трудности перевода: почему LLM не умеют писать нормальные докстринги на русском и как это исправить

    Каждый, кто пробовал заставить кодинг-LLM написать вменяемый комментарий к коду на русском, знает, какая это боль. Часто модели либо срываются на английский, либо выдают «кальку», либо игнорируют структуру. А всё потому, что они изначально заточены на английский язык. Огрехи встречаются, в частности, в терминологии: модели путают технические заимствования, например «деплой», «коммит», с их буквальным переводом, что делает текст неестественным для разработчика. В структуре тоже не всегда всё гладко: при генерации на русском модели часто «ломают» установленный для Docstring формат (описание, параметры, return, exceptions), из-за чего IDE перестают подхватывать документацию. Существующие в природе датасеты для обучения кодинг-моделей вроде CodeSearchNet и The Vault либо не содержат русского языка, либо, как MCoNaLa, заточены на поиск, а не на генерацию документации. Именно эту проблему решают ученые из MWS AI: они самостоятельно собрали датасет StRuCom, как раз ориентированный на обучение ИИ генерировать комментарии к коду. Под катом — история о том, как он был собран.

    habr.com/ru/companies/mts_ai/a

    #датасет #комментарии_к_коду #docstrings #автоматизация_разработки #искусственный_интеллект #llm #обучение_моделей #научные_исследования #синтетические_данные #ai

  5. With #Python now being "the most popular programming language" (don't get me started...), the #Unicode consortium has announced a new #codepoint specifically to aid Python #developers and increase efficiency -- both of time, and of storage.

    The next Unicode release will include a codepoint representing triple double quotes, making #docstrings much easier.

    #quotes #DoubleQuotes #TripleDoubleQuotes #docstring #syntax #popularity

  6. With #Python now being "the most popular programming language" (don't get me started...), the #Unicode consortium has announced a new #codepoint specifically to aid Python #developers and increase efficiency -- both of time, and of storage.

    The next Unicode release will include a codepoint representing triple double quotes, making #docstrings much easier.

    #quotes #DoubleQuotes #TripleDoubleQuotes #docstring #syntax #popularity

  7. With #Python now being "the most popular programming language" (don't get me started...), the #Unicode consortium has announced a new #codepoint specifically to aid Python #developers and increase efficiency -- both of time, and of storage.

    The next Unicode release will include a codepoint representing triple double quotes, making #docstrings much easier.

    #quotes #DoubleQuotes #TripleDoubleQuotes #docstring #syntax #popularity

  8. With #Python now being "the most popular programming language" (don't get me started...), the #Unicode consortium has announced a new #codepoint specifically to aid Python #developers and increase efficiency -- both of time, and of storage.

    The next Unicode release will include a codepoint representing triple double quotes, making #docstrings much easier.

    #quotes #DoubleQuotes #TripleDoubleQuotes #docstring #syntax #popularity

  9. With #Python now being "the most popular programming language" (don't get me started...), the #Unicode consortium has announced a new #codepoint specifically to aid Python #developers and increase efficiency -- both of time, and of storage.

    The next Unicode release will include a codepoint representing triple double quotes, making #docstrings much easier.

    #quotes #DoubleQuotes #TripleDoubleQuotes #docstring #syntax #popularity

  10. Kinda interesting tidbit: #chatgpt just introduced spelling errors into #docstrings I asked it to generate.

  11. Kinda interesting tidbit: #chatgpt just introduced spelling errors into #docstrings I asked it to generate.

  12. [Перевод] Создаём безукоризненную автодокументацию кода на Python с помощью Sphinx

    В этой статье я расскажу о генераторе документации Sphinx , с помощью которого можно автоматически создавать документацию для модулей Python. Кроме того, я буду использовать шаблон проекта Cookiecutter Data Science в Visual Studio Code (VS Code), поскольку он легко интегрируется в Sphinx и имеет стандартизированную структуру директорий. Официальное пособие по использованию Sphinx — отличный ресурс для пользователей, которые хотят углубиться в детали. А моя статья — это краткое руководство по началу работы с этим инструментом.

    habr.com/ru/companies/netology

    #python #документация #sphinx #data_science #автодокументация #docstrings #demopy #строки_документации #confpy #модули_python

  13. [Перевод] Создаём безукоризненную автодокументацию кода на Python с помощью Sphinx

    В этой статье я расскажу о генераторе документации Sphinx , с помощью которого можно автоматически создавать документацию для модулей Python. Кроме того, я буду использовать шаблон проекта Cookiecutter Data Science в Visual Studio Code (VS Code), поскольку он легко интегрируется в Sphinx и имеет стандартизированную структуру директорий. Официальное пособие по использованию Sphinx — отличный ресурс для пользователей, которые хотят углубиться в детали. А моя статья — это краткое руководство по началу работы с этим инструментом.

    habr.com/ru/companies/netology

    #python #документация #sphinx #data_science #автодокументация #docstrings #demopy #строки_документации #confpy #модули_python

  14. [Перевод] Создаём безукоризненную автодокументацию кода на Python с помощью Sphinx

    В этой статье я расскажу о генераторе документации Sphinx , с помощью которого можно автоматически создавать документацию для модулей Python. Кроме того, я буду использовать шаблон проекта Cookiecutter Data Science в Visual Studio Code (VS Code), поскольку он легко интегрируется в Sphinx и имеет стандартизированную структуру директорий. Официальное пособие по использованию Sphinx — отличный ресурс для пользователей, которые хотят углубиться в детали. А моя статья — это краткое руководство по началу работы с этим инструментом.

    habr.com/ru/companies/netology

    #python #документация #sphinx #data_science #автодокументация #docstrings #demopy #строки_документации #confpy #модули_python

  15. @davidism

    Depending on what you mean by attribute - you just want to extract the #docstrings?

    On class (and class instances) and function/method objects, it's available as `<obj>.__doc__`. Same for modules. That covers most types of objects...

    If you mean extracting information from type annotations, there's an inspection interface for that, too.

  16. @davidism

    Depending on what you mean by attribute - you just want to extract the #docstrings?

    On class (and class instances) and function/method objects, it's available as `<obj>.__doc__`. Same for modules. That covers most types of objects...

    If you mean extracting information from type annotations, there's an inspection interface for that, too.

  17. @davidism

    Depending on what you mean by attribute - you just want to extract the #docstrings?

    On class (and class instances) and function/method objects, it's available as `<obj>.__doc__`. Same for modules. That covers most types of objects...

    If you mean extracting information from type annotations, there's an inspection interface for that, too.

  18. @davidism

    Depending on what you mean by attribute - you just want to extract the #docstrings?

    On class (and class instances) and function/method objects, it's available as `<obj>.__doc__`. Same for modules. That covers most types of objects...

    If you mean extracting information from type annotations, there's an inspection interface for that, too.

  19. @davidism

    Depending on what you mean by attribute - you just want to extract the #docstrings?

    On class (and class instances) and function/method objects, it's available as `<obj>.__doc__`. Same for modules. That covers most types of objects...

    If you mean extracting information from type annotations, there's an inspection interface for that, too.

  20. @folkerschamel @zenforyen @kevin @ado

    Actually, I think that #type #hints in the #function #signature are usually *better* than having them in #docstrings. Not only can they not get out of date / become wrong (without causing checking failures), static type checking is much easier this way.

  21. @folkerschamel @zenforyen @kevin @ado

    Actually, I think that #type #hints in the #function #signature are usually *better* than having them in #docstrings. Not only can they not get out of date / become wrong (without causing checking failures), static type checking is much easier this way.

  22. @folkerschamel @zenforyen @kevin @ado

    Actually, I think that #type #hints in the #function #signature are usually *better* than having them in #docstrings. Not only can they not get out of date / become wrong (without causing checking failures), static type checking is much easier this way.

  23. @folkerschamel @zenforyen @kevin @ado

    Actually, I think that #type #hints in the #function #signature are usually *better* than having them in #docstrings. Not only can they not get out of date / become wrong (without causing checking failures), static type checking is much easier this way.

  24. @folkerschamel @zenforyen @kevin @ado

    Actually, I think that #type #hints in the #function #signature are usually *better* than having them in #docstrings. Not only can they not get out of date / become wrong (without causing checking failures), static type checking is much easier this way.

  25. #Python question:
    How do you talk about \n chars in #docstrings? do you r""" the docstring?
    Do you spell out "new line char"?

  26. #Python question:
    How do you talk about \n chars in #docstrings? do you r""" the docstring?
    Do you spell out "new line char"?

  27. #Python question:
    How do you talk about \n chars in #docstrings? do you r""" the docstring?
    Do you spell out "new line char"?

  28. #Python question:
    How do you talk about \n chars in #docstrings? do you r""" the docstring?
    Do you spell out "new line char"?

  29. #Python question:
    How do you talk about \n chars in #docstrings? do you r""" the docstring?
    Do you spell out "new line char"?

  30. CW: tech

    Anyone know a #FOSS #YAML library for generating documentation? I'm looking to do #DocStrings in #GitLab #CICD files. I've seen a handful of options but they seem abandoned or very nascent.

    #Python #DevOps #SoftwareEngineering

  31. CW: tech

    Anyone know a #FOSS #YAML library for generating documentation? I'm looking to do #DocStrings in #GitLab #CICD files. I've seen a handful of options but they seem abandoned or very nascent.

    #Python #DevOps #SoftwareEngineering

  32. CW: tech

    Anyone know a #FOSS #YAML library for generating documentation? I'm looking to do #DocStrings in #GitLab #CICD files. I've seen a handful of options but they seem abandoned or very nascent.

    #Python #DevOps #SoftwareEngineering

  33. CW: tech

    Anyone know a #FOSS #YAML library for generating documentation? I'm looking to do #DocStrings in #GitLab #CICD files. I've seen a handful of options but they seem abandoned or very nascent.

    #Python #DevOps #SoftwareEngineering

  34. CW: tech

    Anyone know a #FOSS #YAML library for generating documentation? I'm looking to do #DocStrings in #GitLab #CICD files. I've seen a handful of options but they seem abandoned or very nascent.

    #Python #DevOps #SoftwareEngineering

  35. 🌠 I created a repository with my solutions for the puzzles

    🧩 All solutions use only the  with no need for external packages

    🔬  are included in function and can be run using the  module

    ⚠️ I don't think I will be able to enter the every day and definitely not in the morning

    🐍 I participate in to my Python rather than to compete in the

    👇
    github.com/pauloxnet/adventofc

  36. 🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles

    🧩 All solutions use only the #PythonStandardLibrary with no need for external packages

    🔬 #Tests are included in function #docstrings and can be run using the #doctest module

    ⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning

    🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard

    👇
    github.com/pauloxnet/adventofc

  37. 🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles

    🧩 All solutions use only the #PythonStandardLibrary with no need for external packages

    🔬 #Tests are included in function #docstrings and can be run using the #doctest module

    ⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning

    🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard

    👇
    github.com/pauloxnet/adventofc

  38. 🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles

    🧩 All solutions use only the #PythonStandardLibrary with no need for external packages

    🔬 #Tests are included in function #docstrings and can be run using the #doctest module

    ⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning

    🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard

    👇
    github.com/pauloxnet/adventofc

  39. 🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles

    🧩 All solutions use only the #PythonStandardLibrary with no need for external packages

    🔬 #Tests are included in function #docstrings and can be run using the #doctest module

    ⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning

    🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard

    👇
    github.com/pauloxnet/adventofc

  40. @HeidiSeibold I try to document my software well. Keep documentation and code together. I believe this makes it less likely to get out of sync.
    In #Python , #docstrings are great for usage documentation. They are embedded in the code and at the same time facilitate automatic generation of nicely formatted, coherent documentation.
    I also try to improve code readability by opting for more self-explanatory code structures and naming and comment sparingly where necessary.

  41. @HeidiSeibold I try to document my software well. Keep documentation and code together. I believe this makes it less likely to get out of sync.
    In , are great for usage documentation. They are embedded in the code and at the same time facilitate automatic generation of nicely formatted, coherent documentation.
    I also try to improve code readability by opting for more self-explanatory code structures and naming and comment sparingly where necessary.

  42. @HeidiSeibold I try to document my software well. Keep documentation and code together. I believe this makes it less likely to get out of sync.
    In #Python , #docstrings are great for usage documentation. They are embedded in the code and at the same time facilitate automatic generation of nicely formatted, coherent documentation.
    I also try to improve code readability by opting for more self-explanatory code structures and naming and comment sparingly where necessary.